pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Milen A. Radev <milen@radev.net>
To: pgsql-admin@postgresql.org
Subject: Re: Privileges to sequences?
Date: Fri, 08 Aug 2008 18:28:21 +0300
Message-ID: <g7homm$r6g$1@ger.gmane.org> (raw)
In-Reply-To: <20F7D7F1-4939-4BE3-9116-4C82FE176E07@indiana.edu>
References: <20F7D7F1-4939-4BE3-9116-4C82FE176E07@indiana.edu>

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




view thread (2+ messages)

Message-ID: <g7homm$r6g$1@ger.gmane.org>
Permalink:  ../g7homm$r6g$1@ger.gmane.org/
Also on:    postgresql.org/message-id/g7homm$r6g$1@ger.gmane.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: milen@radev.net
  Subject: Re: Privileges to sequences?
  In-Reply-To: <g7homm$r6g$1@ger.gmane.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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