pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Privileges to sequences?
2+ messages / 2 participants
[nested] [flat]

* Privileges to sequences?
@ 2008-08-08 14:48 Carol Walter <walterc@indiana.edu>
  2008-08-08 15:28 ` Re: Privileges to sequences? Milen A. Radev <milen@radev.net>
  0 siblings, 1 reply; 2+ messages in thread

From: Carol Walter @ 2008-08-08 14:48 UTC (permalink / raw)
  To: pgsql-admin

Hello,

I've had trouble several times when granting permissions on tables  
when I had not also granted permission to the sequence.  The  
sequences may only have select, insert, and usage privileges.  I can  
guess that when I grant select privileges on a table, I need to grant  
select privileges to the sequence and I can guess that if I grant  
insert privileges to a table I need to grant the insert privilege to  
the sequence.  I don't know when to usage and I don't know what  
privileges, if any, I need to grant to the sequence if I'm going to  
give delete, update, or references privileges on the tables.

Thanks,
Carol



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Privileges to sequences?
  2008-08-08 14:48 Privileges to sequences? Carol Walter <walterc@indiana.edu>
@ 2008-08-08 15:28 ` Milen A. Radev <milen@radev.net>
  0 siblings, 0 replies; 2+ messages in thread

From: Milen A. Radev @ 2008-08-08 15:28 UTC (permalink / raw)
  To: pgsql-admin

Carol Walter написа:
> Hello,
> 
> I've had trouble several times when granting permissions on tables when 
> I had not also granted permission to the sequence.  The sequences may 
> only have select, insert, and usage privileges.  I can guess that when I 
> grant select privileges on a table, I need to grant select privileges to 
> the sequence and I can guess that if I grant insert privileges to a 
> table I need to grant the insert privilege to the sequence.  I don't 
> know when to usage and I don't know what privileges, if any, I need to 
> grant to the sequence if I'm going to give delete, update, or references 
> privileges on the tables.
[...]


Reading the documentation:
- if you only grant SELECT on the table in question - no privileges are 
needed for the linked sequence;
- for normal usage (selects, inserts, updates, deletes) - the USAGE 
privilege seems quite handy;
- when you need to grant full access to a sequence (rare case) - both 
SELECT and UPDATE;
- UPDATE, DELETE and REFERENCES privileges on the table(s) are not 
related to the privileges of the corresponding sequence;


-- 
Milen A. Radev




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2008-08-08 15:28 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2008-08-08 14:48 Privileges to sequences? Carol Walter <walterc@indiana.edu>
2008-08-08 15:28 ` Milen A. Radev <milen@radev.net>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox