Re: Does a GRANT on a table cascade/implied to its SEQUENCES

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Roderick A(dot) Anderson" <raanders(at)acm(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Does a GRANT on a table cascade/implied to its SEQUENCES
Date: 2006-07-25 04:19:17
Message-ID: 4920.1153801157@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Roderick A. Anderson" <raanders(at)acm(dot)org> writes:
> I've add a new user and as I go though granting various accesses to the
> different tables I realized many of those tables have primary keys that
> are generated by a sequence.

> Do I need to grant access on the sequences and what type of access --
> SELECT for sure but what about UPDATE -- for each of the tables I've
> granted the user access to?

Right now, GRANT on a table doesn't do anything about subsidiary
sequences. (There have been discussions about changing that, but
nothing's happened yet.) So if you want someone to be able to INSERT
into a table with a serial column, you need to give them UPDATE rights
on the sequence. Offhand I see no direct reason why they'd need SELECT
rights on the sequence, but maybe they do.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Philippe Lang 2006-07-25 06:43:00 Re: Plperl return_next and bytea binary data?
Previous Message Redefined Horizons 2006-07-25 04:01:31 Re: Beginner's questions about creating a custom data type in PostgreSQL...