I have seen postgresql allowing users to Grant update on a sequence. But never seen any update query on the sequence.
Sequence values are usually changed using ALTER SEQUENCE
command. I understand the need for GRANT USAGE
and GRANT SELECT
on sequences. But what exactly does a GRANT UPDATE
on a sequence lets you do in PostgreSQL.
Add a comment
|
1 Answer
The documentation says:
nextval ( regclass )
→bigint
[...]
This function requiresUSAGE
orUPDATE
privilege on the sequence.
setval ( regclass, bigint [, boolean ] )
→bigint
[...]
This function requiresUPDATE
privilege on the sequence.