53.24. pg_sequences
pg_sequences
The view pg_sequences provides access to useful information about each sequence in the database.
Column Type Description |
|---|
schemaname Name of schema containing sequence |
sequencename Name of sequence |
sequenceowner Name of sequence's owner |
data_type Data type of the sequence |
start_value Start value of the sequence |
min_value Minimum value of the sequence |
max_value Maximum value of the sequence |
increment_by Increment value of the sequence |
cycle Whether the sequence cycles |
cache_size Cache size of the sequence |
last_value 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. |
: pg_sequences Columns
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
USAGEorSELECTprivilege on the sequence. -
The sequence is unlogged and the server is a standby.