What you should know about constraints in PostgreSQL (and what's new in 18)
PostgreSQL 18 introduced significant enhancements to constraints, your first line of defense for maintaining data integrity. This talk focuses on the new capabilities brought by version 18, including temporal PK/UK and FKs, NOT NULL constraints being promoted to first-class constraints, new NOT ENFORCED constraints, and improved support for partitioned tables. We’ll look at what’s new, why it matters, and how to apply these features in real-world systems.
We’ll begin with a brief refresher on the different types of constraints to help you get the most out of PostgreSQL’s declarative integrity model by looking at the pg_constraint catalog.
Then we’ll go into the details of what’s new in PostgreSQL 18 and what you should take away from these changes.