| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
| Cc: | Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: Bogus permissions display in 7.4 |
| Date: | 2004-05-14 16:41:16 |
| Message-ID: | 25644.1084552876@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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 | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Oleg Bartunov | 2004-05-14 17:23:30 | new version of contrib/pg_trgm is available ! |
| Previous Message | Bruce Momjian | 2004-05-14 16:26:32 | Re: Bogus permissions display in 7.4 |