Re: Bogus permissions display in 7.4

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Bogus permissions display in 7.4
Дата
Msg-id 25644.1084552876@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Bogus permissions display in 7.4  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Bogus permissions display in 7.4
Следующее
От: Oleg Bartunov
Дата:
Сообщение: new version of contrib/pg_trgm is available !