Re: Grant question

From: Martín Marqués <martin(at)bugs(dot)unl(dot)edu(dot)ar>
To: blindsey(at)cog(dot)ufl(dot)edu
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Grant question
Date: 2004-01-29 14:54:49
Message-ID: 1075388089.40191eb9a0cb6@bugs.unl.edu.ar
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Mensaje citado por Barbara Lindsey <blindsey(at)cog(dot)ufl(dot)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
-------------------------------------------------------

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Barbara Lindsey 2004-01-29 15:03:49 Re: Grant question
Previous Message Barbara Lindsey 2004-01-29 14:52:56 Grant question