| From: | <btober(at)seaworthysys(dot)com> | 
|---|---|
| To: | <blindsey(at)cog(dot)ufl(dot)edu>, <pgsql-general(at)postgresql(dot)org> | 
| Subject: | Re: Grant question | 
| Date: | 2004-01-29 16:00:14 | 
| Message-ID: | 65236.216.238.112.88.1075392014.squirrel@$HOSTNAME | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-general | 
> On Thu, Jan 29, 2004 at 09:52:56 -0500,
>   Barbara Lindsey <blindsey(at)cog(dot)ufl(dot)edu> wrote:
>> 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.
>
> Sequences have permissions separate from tables. I believe you need
> update access to call nextval or setval on a sequence. This should be
> described in the documention on the GRANT command.
CREATE SEQUENCE paid.person_person_pk_seq
  INCREMENT 1
  MINVALUE 1
  MAXVALUE 9223372036854775807
  START 232
  CACHE 1;
REVOKE ALL ON TABLE paid.person_person_pk_seq FROM public;
GRANT ALL ON TABLE paid.person_person_pk_seq TO blindsey;
GRANT SELECT, UPDATE ON TABLE paid.person_person_pk_seq TO GROUP app_user;
~Berend Tober
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alberto Mariani | 2004-01-29 16:27:51 | How to... | 
| Previous Message | John Sidney-Woollett | 2004-01-29 15:10:56 | Re: Grant question |