Re: Why we allow CHECK constraint contradiction? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Why we allow CHECK constraint contradiction?
Date
Msg-id 11850.1539363458@sss.pgh.pa.us
Whole thread Raw
In response to Re: Why we allow CHECK constraint contradiction?  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> Now, I think there is a reasonable argument that it would still be
> nice to give an ERROR diagnostic in the cases we can detect, but I do
> not agree with that argument, for all of the reasons stated here: the
> development resources are better spent elsewhere, somebody might be
> creating such a contradictory constraint deliberately for whatever
> purpose, it might annoy or confuse users to get the error in only some
> cases.

It's also arguable that throwing an ERROR would be contrary to spec,
in that it would prevent creation of constraints that the SQL standard
does not forbid.

You could dodge that problem by making the message be just a WARNING
or less.  Still, though, the other arguments-against remain valid.

            regards, tom lane


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: View to get all the extension control file details
Next
From: Robert Haas
Date:
Subject: Re: Requesting advanced Group By support