Re: operator exclusion constraints [was: generalized index constraints]
Jeff Davis <pgsql@j-davis.com>
From: Jeff Davis <pgsql@j-davis.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org
Date: 2009-09-20T17:38:01Z
Lists: 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