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