Schedule - FOSDEM 2010 (PostgreSQL parts)

Beyond UNIQUE: Exclusion constraints in PostgreSQL 9.0

Date: 2010-02-06
Time: 16:15–17:00
Room: AW1.121

A core feature of a relational database is being able to define constraints on the data, and have the database enforce those constraints. Today, there exists only one kind of constraint that will look at a combination of more than one row in a table - the UNIQUE constraint, often used as a tables PRIMARY KEY. This constraint makes sure no two rows have the same combination of values in the specified columns. But many datamodels contain completely different constraints, such as requiring non-overlapping ranges. For example, the requirement that a resource such as a conference room is not double booked.

PostgreSQL 9.0 introduces the feature Exclusion Constraints, and this talk will present this feature and how to use it to solve this type of problem with a declarative constraint - while maintaining performance and concurrency in the system.

Speaker

Magnus Hagander