pg_sequence — PostgreSQL system catalog

The PostgreSQL pg_sequence system catalog: full column reference (names, types, descriptions), catalog relationships and version support.

Summary

The catalog pg_sequence contains information about sequences. Some of the information about sequences, such as the name and the schema, is in pg_class

(Description quoted from the official PostgreSQL documentation.)

Columns

The pg_sequence system catalog exposes the following columns (names, types and descriptions are taken verbatim from the PostgreSQL documentation):

  • seqrelid oid references pg_class.oid
    The OID of the pg_class entry for this sequence
  • seqtypid oid references pg_type.oid
    Data type of the sequence
  • seqstart int8
    Start value of the sequence
  • seqincrement int8
    Increment value of the sequence
  • seqmax int8
    Maximum value of the sequence
  • seqmin int8
    Minimum value of the sequence
  • seqcache int8
    Cache size of the sequence
  • seqcycle bool
    Whether the sequence cycles

Related catalogs

This object references the following other system catalogs:

Version applicability

Present in PostgreSQL 17, 18, 19 (verified against each release’s documentation). This is a long-standing system object that also exists in earlier PostgreSQL releases.

Related & references

Reference: PostgreSQL documentation — pg_sequence.