Which GRANTS are needed on a Sequnce?
Which GRANTS are needed on a Sequnce?
От:
Dani Oderbolz <oderbolz@ecologic.de>
Дата:
Hi all, I just created a Sequence S for User A. User B has the USAGE Privilage in Schema A. I granted SELECT On S TO B. But this does not seem to be enough to use the Sequcence, postgres claims: [1] ERROR: S.nextval: you don't have permissions to set sequence S So I granted ALL ON S TO B which works fine. What are the minimal grants neeeded? (And where is it documented, the reference of 7.3.3 sais nothing about Sequences) Cheers, Dani
Re: Which GRANTS are needed on a Sequnce?
От:
Bruno Wolff III <bruno@wolff.to>
Дата:
On Fri, Jun 27, 2003 at 16:43:49 +0200, Dani Oderbolz wrote: > Hi all, > I just created a Sequence S for User A. > User B has the USAGE Privilage in Schema A. > I granted SELECT On S TO B. > But this does not seem to be enough to use the Sequcence, > postgres claims: > [1] ERROR: S.nextval: you don't have permissions to set sequence S > So I granted ALL ON S TO B > which works fine. > What are the minimal grants neeeded? (And where is it documented, > the reference of 7.3.3 sais nothing about Sequences) You need to grant update access to the sequence. This is documented at: http://www.postgresql.org/docs/view.php?version=7.3&idoc=0&file=sql-grant.html Look under what access is granted by update.
Re: Which GRANTS are needed on a Sequnce?
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Dani Oderbolz writes: > What are the minimal grants neeeded? (And where is it documented, > the reference of 7.3.3 sais nothing about Sequences) http://www.postgresql.org/docs/view.php?version=7.3&idoc=0&file=sql-grant.html SELECT and UPDATE rights apply to sequences in about the way you'd expect (read and write privilege, respectively). regards, tom lane