What you should know about constraints in PostgreSQL 18
summary
PostgreSQL 18 adds concrete changes to constraints: temporal keys (primary/unique/foreign keys over range periods, implemented via btree_gist/EXCLUDE-style logic and rejecting overlapping ranges), NOT NULL as a first-class constraint (named, deferrable, storable in pg_constraint and usable with NOT VALID), and NOT ENFORCED constraints (creates informational constraints without triggers until flipped, with per-partition validation support). The talk demos pg_constraint queries, explains constraint triggers and domains, notes empty ranges aren’t supported, and previews Postgres 19’s split/update/delete-for-portion behavior.
AI-written summary · about
chapters (6)
- 0:00Introduction to constraints
- 1:11PostgreSQL constraint catalog
- 13:58Temporal keys in PostgreSQL 18
- 27:02Not enforced constraints
- 31:35Not null as a proper constraint
- 36:33What's coming in PostgreSQL 19
related talks
27mWhat's new with constraints in Postgres 18
43mWhat You Should Know About Constraints in PostgreSQL (and What’s New in 18
50mRange Types in PostgreSQL 9.2 - Your Life Will Never Be the Same
49mPostgreSQL vs The Standard
44mPostgreSQL in Django 1.8
24mPostgreSQL Design Patterns
46mEnhancements to the bitemporal model support: integrity constraints
30mLesser known features of PostgreSQL
