Re: Proposal: GRANT cascade to implicit sequences - Mailing list pgsql-general

From Greg Stark
Subject Re: Proposal: GRANT cascade to implicit sequences
Date
Msg-id 87fz4i60hz.fsf@stark.xeocode.com
Whole thread Raw
In response to Re: Proposal: GRANT cascade to implicit sequences  (Bruno Wolff III <bruno@wolff.to>)
Responses Re: Proposal: GRANT cascade to implicit sequences
List pgsql-general
Bruno Wolff III <bruno@wolff.to> writes:

> I also think there is some merit in splitting the access rights for nextval
> and setval, so that insert access grants access to nextval and update access
> grants access to setval (or perhaps both nextval and setval). That way people
> who can just insert in the table can't set the sequence number backwards.

That might be a useful thing to do to sequences in general. Being able to
grant INSERT on a sequence to allow nextval without allowing setval could be
useful even for explicit sequences.

I can't think of a good approach for migration of old pg_dumps though, so
perhaps this is more trouble than it's worth.

Implicit sequences on the other hand can be migrated easily by ignoring all
explicit grants and just looking at the grants on the table.

--
greg

pgsql-general by date:

Previous
From: "Ian Harding"
Date:
Subject: Re: update query confusion
Next
From: Tom Lane
Date:
Subject: Re: Proposal: GRANT cascade to implicit sequences