Glossary — in plain language

Sequence


In plain English

A sequence is a special counter object that hands out increasing numbers, most often used to generate unique IDs for a table primary key (the magic behind SERIAL and IDENTITY columns).

Why it matters

Sequences can get out of sync after a manual data load or restore, which then causes duplicate-key errors. Resetting them with setval is a routine fix.

Was this helpful?

← Browse the full glossary