Re: set constraints docs page - Mailing list pgsql-hackers

From Tom Lane
Subject Re: set constraints docs page
Date
Msg-id 28221.1061300815@sss.pgh.pa.us
Whole thread Raw
In response to Re: set constraints docs page  ("Andrew Dunstan" <andrew@dunslane.net>)
Responses Re: set constraints docs page
List pgsql-hackers
"Andrew Dunstan" <andrew@dunslane.net> writes:
>> I object to creating gratuitous incompatibilities with the SQL standard,
>> which will obstruct legitimate features down the road.  The SQL standard
>> says it is <schema>.<constraint>.

> Is there a case for enforcing uniqueness on constraint names, then?

Other than "SQL92 says so"?  Very little.  This seems to me to be a
design error in the spec.  Per-table constraint names are easier to
work with --- if they're global across a schema then you have a serious
problem avoiding collisions.

The spec does have a notion of "assertions", which are constraints not
tied to any specific table; for those I suppose you need a
schema-wide namespace.  I do not foresee us supporting such things
anytime soon though.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Andrew Dunstan"
Date:
Subject: Re: set constraints docs page
Next
From: Stephan Szabo
Date:
Subject: Re: set constraints docs page