News for hackers. Stuff that matters.
Re:Underrated Features of PostgreSQL by kijin on Wednesday November 02, 2011 @12:02PM (#3187407)
According to the manual [1], this is one of the standard use cases for partial indexes. See the last section.

CREATE UNIQUE INDEX index_name ON table_name (a, b) WHERE deleted_time IS NULL;

[1] http://www.postgresql.org/docs/9.1/static/indexes-partial.ht...

There are no comments on this comment yet.