Re: Grant question - Mailing list pgsql-general

From Martín Marqués
Subject Re: Grant question
Date
Msg-id 1075388089.40191eb9a0cb6@bugs.unl.edu.ar
Whole thread Raw
In response to Grant question  (Barbara Lindsey <blindsey@cog.ufl.edu>)
List pgsql-general
Mensaje citado por Barbara Lindsey <blindsey@cog.ufl.edu>:

> What kind of grant do you need to give a user so that they can have
> permission to do a "SELECT nextval(ID)" on a sequence?
> I granted the user SELECT,UPDATE,INSERT,DELETE on all the tables,
> including the one that has the sequence, but the sequence query is
> failing on permissions.

You have to give him grant permissons on the sequence, not only the table, as when
you do a nextval(´sequece_name´) you are updating the value of the sequence.

P.D.: Could there be some extra docs about this in the GRANT command manual:

http://www.postgresql.org/docs/current/interactive/sql-grant.html

It speeks about granting all kind of relations, but not sequences. Just a tip.

--
select 'mmarques' || '@' || 'unl.edu.ar' AS email;
-------------------------------------------------------
Martín Marqués          |   Programador, DBA
Centro de Telemática    |     Administrador
               Universidad Nacional
                    del Litoral
-------------------------------------------------------

pgsql-general by date:

Previous
From: Barbara Lindsey
Date:
Subject: Grant question
Next
From: Bruno Wolff III
Date:
Subject: Re: Grant question