pg_sequences
The view pg_sequences
provides access to
useful information about each sequence in the database.
Table 56.23. pg_sequences
Columns
Column Type Description |
---|
Name of schema containing sequence |
Name of sequence |
Name of sequence's owner |
Data type of the sequence |
Start value of the sequence |
Minimum value of the sequence |
Maximum value of the sequence |
Increment value of the sequence |
Whether the sequence cycles |
Cache size of the sequence |
The last sequence value written to disk. If caching is used, this value can be greater than the last value handed out from the sequence. |
The last_value
column will read as null if any of
the following are true:
The sequence has not been read from yet.
The current user does not have USAGE
or
SELECT
privilege on the sequence.
The sequence is unlogged and the server is a standby.