Re: Privileges to sequences?

From: "Milen A(dot) Radev" <milen(at)radev(dot)net>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: Privileges to sequences?
Date: 2008-08-08 15:28:21
Message-ID: g7homm$r6g$1@ger.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Charles N. Charotti 2008-08-08 16:29:24 Best file system from PG on OpenBSD
Previous Message Carol Walter 2008-08-08 14:48:50 Privileges to sequences?