Re: PostgreSQL 7.1 and Sequences

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: PostgreSQL 7.1 and Sequences
Дата
Msg-id 27858.987955682@sss.pgh.pa.us
обсуждение исходный текст
Ответ на PostgreSQL 7.1 and Sequences  ("Alastair D'Silva" <deece@newmillennium.net.au>)
Список pgsql-general
"Alastair D'Silva" <deece@newmillennium.net.au> writes:
> I've recently upgraded to 7.1 and have the following situation which no
> longer works:
> As user "nmnadmin":
> CREATE TABLE blah {
>         id NOT NULL SERIAL,
>         info text NOT NULL
> };
> GRANT SELECT, INSERT, UPDATE, DELETE ON blah TO nmnuser;
> As user "nmnuser":
> INSERT INTO blah (info) VALUES ('foo');
> I get the following error:
> blah_id_seq.nextval: you don't have permissions to set sequence blah_id_seq

You should also do
    GRANT UPDATE ON blah_id_seq TO nmnuser;

I am not sure whether to regard the change from 7.0 behavior as a bug or
not.  The old handling of permission-checking for sequences was pretty
broken, and I don't want to revert to it.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: last comma inside "CREATE TABLE ()" statements
Следующее
От: "David Wall"
Дата:
Сообщение: Re: Re: Getting milliseconds out of TIMESTAMP