Appearance
ON SEQUENCE
Syntax
GRANT { { USAGE | SELECT | UPDATE }
[, ...] | ALL [ PRIVILEGES ] }
ON { SEQUENCE sequence_name [, ...]
| ALL SEQUENCES IN SCHEMA schema_name [, ...] }
TO role_specification [, ...] [ WITH GRANT OPTION ]
Parameters
- USAGE
- Privilege to access sequences in the specified schema. This privilege allows the role to see sequences, but does not grant
SELECT
orUPDATE
privileges on them. - SELECT
- Privilege to select from the sequence.
- UPDATE
- Privilege to alter the sequence.
- ON SEQUENCE
- Grant privileges on specific sequence objects.
- ALL SEQUENCES IN SCHEMA
- Grant the privilege to all the sequences in the named schema.
Examples
Grant privileges on sequences:
premdb=# grant usage on matchid to bobr;
GRANT
For example:
premdb=# grant select on all sequences in schema public to bobr with grant option;
GRANT
Parent topic:GRANT