Re: operator exclusion constraints

David Fetter <david@fetter.org>

From: David Fetter <david@fetter.org>
To: Josh Berkus <josh@agliodbs.com>
Cc: Robert Haas <robertmhaas@gmail.com>, Jeff Davis <pgsql@j-davis.com>, Tom Lane <tgl@sss.pgh.pa.us>, Peter Eisentraut <peter_e@gmx.net>, Simon Riggs <simon@2ndQuadrant.com>, pgsql-hackers@postgresql.org
Date: 2009-11-23T00:03:00Z
Lists: pgsql-hackers
On Fri, Nov 20, 2009 at 01:36:59PM +0900, Josh Berkus wrote:
> RObert,
> 
> > I guess I'm going to have to vote -1 on this proposal.  I code see
> > inventing a pgsql-specific SQLSTATE value for exclusion constraints,
> > since they will be a pgsql-specific extension, but reusing the unique
> > key violation value seems misleading.  I admit it may help in a
> > limited number of cases, but IMHO it's not worth the confusion.
> 
> I'd rather have a new one than just using "contstraint violation" which
> is terribly non-specific, and generally makes the application developer
> think that a value is too large.

What, if anything, does the standard have to say about violations of
ASSERTIONs?  I know these aren't ASSERTIONs, but they much more
closely resemble them than they do UNIQUE constraints.  For example,
if the operator is <> instead of =, a violation is actually the
opposite of a UNIQUE violation.

Cheers,
David.
-- 
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate