Re: Is there a way to implicitly grant privileges to an implicitly created sequence? - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: Is there a way to implicitly grant privileges to an implicitly created sequence?
Date
Msg-id 20050222145722.GF22550@wolff.to
Whole thread Raw
In response to Is there a way to implicitly grant privileges to an implicitly created sequence?  (Brar Piening <brar@gmx.de>)
List 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 by date:

Previous
From: Hervé Piedvache
Date:
Subject: Pg 8.01 big trouble with LIMIT (bug !?)
Next
From: Stefan.Ardeleanu@siveco.ro
Date:
Subject: FW: execute dynamic strings. need help.