Bruce Momjian <[EMAIL PROTECTED]> writes:
> Basically our whole API of communicating ACL information to the user is
> poor. Look at psql \z:
Well, if you don't like that, there's always the spec's way:
regression=> select * from information_schema.table_privileges where table_name =
'mytable';
grantor | grantee | table_catalog | table_schema | table_name | privilege_type |
is_grantable | with_hierarchy
---------+---------+---------------+--------------+------------+----------------+--------------+----------------
foo | foo | regression | public | mytable | SELECT | YES
| NO
foo | foo | regression | public | mytable | DELETE | YES
| NO
foo | foo | regression | public | mytable | INSERT | YES
| NO
foo | foo | regression | public | mytable | UPDATE | YES
| NO
foo | foo | regression | public | mytable | REFERENCES | YES
| NO
foo | foo | regression | public | mytable | RULE | YES
| NO
foo | foo | regression | public | mytable | TRIGGER | YES
| NO
foo | bar | regression | public | mytable | SELECT | NO
| NO
(8 rows)
I'm not sure this is really all that much more readable than
regression=> \z mytable
Access privileges for database "regression"
Schema | Name | Type | Access privileges
--------+---------+-------+------------------------------------
public | mytable | table | {foo=a*r*w*d*R*x*t*/foo,bar=r/foo}
(1 row)
but it's there if you want it.
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]