Sequence permission suggestion

From: "Aasmund Midttun Godal" <postgresql(at)envisity(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Sequence permission suggestion
Date: 2001-11-26 00:55:14
Message-ID: 20011126005514.10436.qmail@ns.krot.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Today it seems that the following rules governs the permissions of sequences:

SELECT - allow you to select * from seq_name;
INSERT - no effect
UPDATE - allows nextval, setval - and yes implicitly currval
DELETE - no effect

I suggest nextval is moved into the insert permission as this is quite natural - normally you only need to call nextval when you insert a new value into a table. I think this issue is important because setting the sequence to a value lower than the max value in a table will cause errors for other users.

Aasmund Midttun Godal

aasmund(at)godal(dot)com - http://www.godal.com/
+47 40 45 20 46

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2001-11-26 01:19:22 Re: Sequence permission suggestion
Previous Message Aasmund Midttun Godal 2001-11-26 00:30:02 Permissions on views bug.