Re: Usability fail with psql's \dp command

Поиск
Список
Период
Сортировка
От David Fetter
Тема Re: Usability fail with psql's \dp command
Дата
Msg-id 20180728203644.GQ17411@fetter.org
обсуждение исходный текст
Ответ на Usability fail with psql's \dp command  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Usability fail with psql's \dp command  (Fabien COELHO <coelho@cri.ensmp.fr>)
Re: Usability fail with psql's \dp command  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Sat, Jul 28, 2018 at 02:41:24PM -0400, Tom Lane wrote:
> I noticed today that \dp does not distinguish empty acl fields
> (meaning nobody has any privileges) from null acl fields
> (which mean default privileges, typically not empty).
> For instance
> 
> regression=# \c joe joe
> You are now connected to database "joe" as user "joe".
> joe=> create table jt (f1 int);
> CREATE TABLE
> joe=> \dp
>                             Access privileges
>  Schema | Name | Type  | Access privileges | Column privileges | Policies 
> --------+------+-------+-------------------+-------------------+----------
>  public | jt   | table |                   |                   | 
> (1 row)
> 
> joe=> insert into jt values(1);
> INSERT 0 1
> joe=> revoke all on table jt from joe;
> REVOKE
> joe=> \dp
>                             Access privileges
>  Schema | Name | Type  | Access privileges | Column privileges | Policies 
> --------+------+-------+-------------------+-------------------+----------
>  public | jt   | table |                   |                   | 
> (1 row)
> 
> joe=> insert into jt values(1);
> ERROR:  permission denied for table jt
> 
> So those are definitely different privilege states, but they look
> the same.

Please find attached a patch to fix this.  Would this be a
back-patchable bug?

Best,
David.
-- 
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Dmitry Igrishin
Дата:
Сообщение: Re: Usability fail with psql's \dp command
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: add verbosity to pg_basebackup for sync