pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: FM <dist-list@LEXUM.UMontreal.CA>
Cc: pgsql-admin@postgresql.org
Subject: Re: Privileges on sequences
Date: Mon, 20 Oct 2008 18:50:24 -0400
Message-ID: <5694.1224543024@sss.pgh.pa.us> (raw)
In-Reply-To: <48FCE2F5.5090902@lexum.umontreal.ca>
References: <48FCE2F5.5090902@lexum.umontreal.ca>

FM <dist-list@LEXUM.UMontreal.CA> writes:
> BUT if I grant the same priv to the group (that include the user) :
> SELECT nextval('reflex_cited_reports_id');
> ERROR:  permission denied for sequence reflex_cited_reports_id

Works for me ...

regression=# create sequence s1;
CREATE SEQUENCE
regression=# create user u1;
CREATE ROLE
regression=# \c - u1
You are now connected to database "regression" as user "u1".
regression=> select nextval('s1');
ERROR:  permission denied for sequence s1
regression=> \c - postgres
You are now connected to database "regression" as user "postgres".
regression=# create group g1;
CREATE ROLE
regression=# grant g1 to u1;
GRANT ROLE
regression=# grant all on sequence s1 to g1;
GRANT
regression=# \c - u1
You are now connected to database "regression" as user "u1".
regression=> select nextval('s1');
 nextval 
---------
       1
(1 row)

regression=>  

			regards, tom lane



view thread (2+ messages)

Message-ID: <5694.1224543024@sss.pgh.pa.us>
Permalink:  ../5694.1224543024@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/5694.1224543024@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, dist-list@LEXUM.UMontreal.CA
  Subject: Re: Privileges on sequences
  In-Reply-To: <5694.1224543024@sss.pgh.pa.us>

* 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