Re: Is there a way to implicitly grant privileges to an implicitly created sequence?

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: Is there a way to implicitly grant privileges to an implicitly created sequence?
Дата
Msg-id 20050222145722.GF22550@wolff.to
обсуждение исходный текст
Ответ на Is there a way to implicitly grant privileges to an implicitly created sequence?  (Brar Piening <brar@gmx.de>)
Список pgsql-general
On Tue, Feb 22, 2005 at 15:23:23 +0100,
  Brar Piening <brar@gmx.de> wrote:
> Hi there,
> if I use the datatype serial in a table it implicitly creates a sequence.
> If I grant INSERT to a user on this table he still can't insert data as
> he doesn't have the right privileges on the implicitly created sequence.
> Is this a bug or a feature?

I think this is something that will eventually get changed, but for now
you have to live with it.

> Is there a way to implicitly grant the right privileges to this sequence
> wihtout having to know it's name?

There is a function that will return the name of implicit sequences in
version 8.0. However you can't use it directly in a GRANT statement.
If you use scripting to do the table creation, the script could get the
sequence name and execute an appropiate GRANT statement.

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

Предыдущее
От: Hervé Piedvache
Дата:
Сообщение: Pg 8.01 big trouble with LIMIT (bug !?)
Следующее
От: Stefan.Ardeleanu@siveco.ro
Дата:
Сообщение: FW: execute dynamic strings. need help.