Re: operator exclusion constraints

Jeff Davis <pgsql@j-davis.com>

From: Jeff Davis <pgsql@j-davis.com>
To: Dean Rasheed <dean.a.rasheed@googlemail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Simon Riggs <simon@2ndquadrant.com>, Peter Eisentraut <peter_e@gmx.net>, pgsql-hackers@postgresql.org
Date: 2009-11-03T22:05:14Z
Lists: pgsql-hackers
On Tue, 2009-11-03 at 21:31 +0000, Dean Rasheed wrote:
> Is this really a generalized uniqueness constraint, extended to
> support operators other than = ?

That has been discussed in the past:

http://archives.postgresql.org/message-id/1253119552.24770.203.camel@jdavis
http://archives.postgresql.org/message-id/1253122946.24770.250.camel@jdavis

However, some constraints allowed by this feature are the *opposite* of
unique: consider "<>".

Personally, I don't like to use the word UNIQUE to describe a constraint
that may reject unique values or permit duplicates.

We already have some reasonable agreement around EXCLUSION ... CHECK
WITH. We should stick with the current syntax unless there's a good
consensus around some other specific proposal.

Regards,
	Jeff Davis