Re: Bogus permissions display in 7.4 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Bogus permissions display in 7.4
Date
Msg-id 25644.1084552876@sss.pgh.pa.us
Whole thread Raw
In response to Re: Bogus permissions display in 7.4  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Bogus permissions display in 7.4
Next
From: Oleg Bartunov
Date:
Subject: new version of contrib/pg_trgm is available !