Re: operator exclusion constraints

From: David Fetter <david(at)fetter(dot)org>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Jeff Davis <pgsql(at)j-davis(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Simon Riggs <simon(at)2ndQuadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: operator exclusion constraints
Date: 2009-11-23 00:03:00
Message-ID: 20091123000300.GB11427@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message silly8888 2009-11-23 00:22:21 Re: Updating column on row update
Previous Message Tom Lane 2009-11-22 23:51:17 Re: Updating column on row update