49.84. pg_sequences

The view pg_sequences provides access to useful information about each sequence in the database.

Table 49.85. pg_sequences Columns

NameTypeReferencesDescription
schemanamenamepg_namespace.nspnameName of schema containing sequence
sequencenamenamepg_class.relnameName of sequence
sequenceownernamepg_authid.rolnameName of sequence's owner
data_typeregtypepg_type.oidData type of the sequence
start_valuebigint Start value of the sequence
min_valuebigint Minimum value of the sequence
max_valuebigint Maximum value of the sequence
increment_bybigint Increment value of the sequence
cycleboolean Whether the sequence cycles
cache_sizebigint Cache size of the sequence
last_valuebigint 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. Null if the sequence has not been read from yet. Also, if the current user does not have USAGE or SELECT privilege on the sequence, the value is null.