Re: [HACKERS] pg_sequences bug ?

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: [HACKERS] pg_sequences bug ?
Дата
Msg-id CAB7nPqSeg2rU6AkaYZUMN_tz00q6Bx+EQ7X7kbWZoc1kx5VXpw@mail.gmail.com
обсуждение исходный текст
Ответ на [HACKERS] pg_sequences bug ?  ("Shinoda, Noriyoshi" <noriyoshi.shinoda@hpe.com>)
Ответы Re: [HACKERS] pg_sequences bug ?  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список pgsql-hackers
On Sat, Feb 4, 2017 at 2:50 PM, Shinoda, Noriyoshi
<noriyoshi.shinoda@hpe.com> wrote:
>  I tried a committed pg_sequences for PostgreSQL 10dev (https://commitfest.postgresql.org/12/771/).
> I found that when multiple users create SEQUENCE, I cannot see the pg_sequences catalog. I think that should work
justlike pg_tables.
 
>
> $ psql -U user1
> postgres=> CREATE SEQUENCE seq1 ;
> CREATE SEQUENCE
>
> $ psql -U user2
> postgres=> CREATE SEQUENCE seq2 ;
> CREATE SEQUENCE
> postgres=> SELECT * FROM pg_sequences ;
> ERROR:  permission denied for sequence seq1
>
> Apparently it seems that the pg_sequence_last_value function included in the pg_sequences view definition cannot be
executed.
> Is this behavior supposed?

That seems user-unfriendly to me.

We could perhaps just use has_sequence_privilege() and return NULL if
the caller of pg_sequences does not have select and usage access to a
given sequence? Please see the patch attached.
-- 
Michael

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Вложения

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

Предыдущее
От: Ashutosh Sharma
Дата:
Сообщение: Re: [HACKERS] pageinspect: Hash index support
Следующее
От: amul sul
Дата:
Сообщение: Re: [HACKERS] Constraint exclusion failed to prune partition in caseof partition expression involves function call