Postgres Schema Sequences
Every sequence in a PostgreSQL schema.
The Sequences subview of Schema Structure lists all the sequences in the selected PostgreSQL schema, including standalone ones that no column uses.
To view only the sequences belonging to one table's columns, see Constraints & Sequences.

The List #
The Show menu chooses which kinds of sequences are listed. Choose All Sequences to show every kind, or turn kinds on and off individually. Independent and Owned are on by default:
| Kind | Meaning |
|---|---|
| Identity | Backs a GENERATED AS IDENTITY column, and is only used by that column. Hidden by default. |
| Owned | Owned by a column (serial, or OWNED BY), and dropped along with that column. |
| Independent | Not tied to any column. |
- Sequences close to their limit are marked Near maximum (or Near minimum for one that counts down).
- Sequences that can't produce more values are marked Exhausted.
Identity Sequences #
Identity sequences are hidden by default because each one belongs to a single column and is managed through it. To list them, choose Identity or All Sequences from the Show menu.
Their settings (Start, Increment, Cache, and so on) can be edited like any other sequence, with these differences:
- Owning Column can't be changed.
- Only the owning column uses the sequence, so there is no list of columns using it as a default.
- It can only be dropped by dropping the owning column.
Settings #
| Setting | What it is |
|---|---|
| Start, Increment | The first value, and how much each new value goes up by. |
| Min Value, Max Value | The range of values it can produce. |
| Cache | How many values each session reserves at once. Higher values reduce contention on busy tables, but leave bigger gaps when sessions end. |
| Cycles | Whether it wraps back to the minimum after the maximum, instead of failing. |
| Last Value, Current Value | The most recent value handed out. |
| Owning Column | The column the sequence belongs to. Change it, or set it to none, to make the sequence independent. |
| Owning Role | The role that owns the sequence. |
Everything above can be edited except Last Value and Current Value, which are read-only.
To change a sequence's settings
-
Select the sequence in the list.
-
Edit the setting in the detail pane: type a new value, toggle Cycles, or choose a different Owning Column or Owning Role.
-
Press Return or click out of the field. Querious runs
ALTER SEQUENCEright away, so there is no Apply button.
Restarting #
To change the next value the sequence will use, enter a value in Restart with and click Restart. Or, leave the field empty to go back to Start.
You can use this after importing rows with explicit IDs, so new rows don't collide with them.
Adding and Dropping #
Click to create an independent sequence, then rename it and set it up.
- Only independent sequences can be dropped here. Identity and owned sequences are only dropped when their owning column is dropped.
- If columns use the sequence as a default, dropping needs Drop with CASCADE, which removes those defaults too.