Bruce Momjian <pgman@candle.pha.pa.us> 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 | NOfoo | foo | regression
| public | mytable | DELETE | YES | NOfoo | foo | regression | public |
mytable | INSERT | YES | NOfoo | foo | regression | public | mytable | UPDATE
| YES | NOfoo | foo | regression | public | mytable | REFERENCES | YES |
NOfoo | foo | regression | public | mytable | RULE | YES | NOfoo | foo |
regression | public | mytable | TRIGGER | YES | NOfoo | 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