Named Sequence Privileges

A named sequence can require up to three sets of privileges:

Create Privileges

To create a sequence, a user must have CREATE privileges on a schema that contains the sequence.

Usage Privileges

Only the sequence creator/owner and superusers can initially access a new sequence. Other users must be granted the following privileges by a superuser or the sequence owner:

  • SELECT privilege on the sequence.
  • USAGE privilege on the schema that contains the sequence.

These privileges enable users to invoke functions CURRVAL and NEXTVAL on a sequence, either directly on the sequence itself, or implicitly through a table that references the sequence.

Management Privileges

Vertica provides the following SQL statements to manage partitions. Each requires its own set of privileges:

SQL Statement Required Privileges
DROP SEQUENCE Sequence owner or schema owner
ALTER SEQUENCE…RENAME TO Sequence owner with USAGE and CREATE privileges on the schema of the sequence to rename.

Sequence owner with USAGE privilege on the current schema, and CREATE privilege on the destination schema.

ALTER SEQUENCE…OWNER TO Current sequence owner.

For details on granting and revoking sequence privileges, see GRANT (Sequence) and REVOKE (Sequence) in the SQL Reference Manual.