On Tue, Nov 3, 2009 at 5:05 PM, Jeff Davis <pg...@j-davis.com> wrote:
> We already have some reasonable agreement around EXCLUSION ... CHECK
> WITH. We should stick with the current syntax unless there's a good
> consensus around some other specific proposal.

Yeah.  I don't like the inflexibility of the current syntax, but
that's mostly because I wish the feature itself could be made more
general.  It would be nice to be able to write constraints of the
form:

forall <vars> : <expression>

For example, a uniqueness constraint on a column c is: forall x,y : x.c != y.c
And a does-not overlap constraint might look like this: forall x,y :
NOT (x.c && y.c)

Note that an ordinary check constraint is a special case of this where
there is only one rowvar and it is implicit.

HOWEVER, this is probably a lot more work than what you've already
done, and what you've already done is really good, and we shouldn't
hesitate to commit on the grounds that it won't cure diabetes and
balance the budget.  I don't think there is any really beautiful
syntax for the feature as it stands, but considering how useful it is
I am not inclined to stand on ceremony...

...Robert

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to