Re: operator exclusion constraints [was: generalized index constraints]

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: operator exclusion constraints [was: generalized index constraints]
Date: 2009-09-20 17:49:08
Message-ID: 24126.1253468948@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jeff Davis <pgsql(at)j-davis(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Emmanuel Cecchet 2009-09-20 17:53:18 Re: generic copy options
Previous Message Jeff Davis 2009-09-20 17:38:01 Re: operator exclusion constraints [was: generalized index constraints]