Re: operator exclusion constraints [was: generalized index constraints] - Mailing list pgsql-hackers

From Tom Lane
Subject Re: operator exclusion constraints [was: generalized index constraints]
Date
Msg-id 24126.1253468948@sss.pgh.pa.us
Whole thread Raw
In response to Re: operator exclusion constraints [was: generalized index constraints]  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: operator exclusion constraints [was: generalized index constraints]
List pgsql-hackers
Jeff Davis <pgsql@j-davis.com> writes:
> I believe that syntax is possible by specifying the index access method,
> e.g.:

>   CONSTRAINT <name> EXCLUSION (a =, b &&) USING gist;

> versus:

>   CONSTRAINT <name> EXCLUSION (a =, b &&) INDEX <indexname>;

> And the former could build the index implicitly. I haven't written the
> code yet, but I don't see any major problems.

> So, should I eliminate the latter syntax and only support the former, or
> should I support both?

I'd vote for only supporting the former.

What worries me more about that syntax is the postfix-operator ambiguity
--- I think it'll be hard to expand it to expressions.  It might be
better to put the operator at the front; or maybe you need an extra
keyword in there.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: operator exclusion constraints [was: generalized index constraints]
Next
From: Emmanuel Cecchet
Date:
Subject: Re: generic copy options