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

From Jeff Davis
Subject Re: operator exclusion constraints [was: generalized index constraints]
Date
Msg-id 1253468281.6983.39.camel@jdavis
Whole thread Raw
In response to Re: operator exclusion constraints [was: generalized index constraints]  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: operator exclusion constraints [was: generalized index constraints]
List pgsql-hackers
On Sun, 2009-09-20 at 13:28 -0400, Tom Lane wrote:
> What I'm arguing for is a syntax in which the question doesn't even
> arise, ie, a CONSTRAINT doesn't reference an existing index at all.
> If that's not possible for whatever reason, then I think that
> disallowing multiple references isn't going to buy any simplicity.

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?

Regards,Jeff Davis





pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: operator exclusion constraints [was: generalized index constraints]
Next
From: Tom Lane
Date:
Subject: Re: operator exclusion constraints [was: generalized index constraints]