Re: operator exclusion constraints

David E. Wheeler <david@kineticode.com>

From: "David E. Wheeler" <david@kineticode.com>
To: Jeff Davis <pgsql@j-davis.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Robert Haas <robertmhaas@gmail.com>, Peter Eisentraut <peter_e@gmx.net>, Simon Riggs <simon@2ndquadrant.com>, pgsql-hackers@postgresql.org
Date: 2009-11-06T18:50:19Z
Lists: pgsql-hackers
On Nov 6, 2009, at 10:42 AM, Jeff Davis wrote:

> Right now, I am leaning toward Form 2, and EXCLUSION/BY. So the  
> typical
> case would read like:
>
>  EXCLUSION USING gist (room, during) BY (=, &&)

I like this, but like EXCLUDE better

     EXCLUDE USING gist (room, during) BY (=, &&)

Is your objection to EXCLUDE for cases when there is no USING clause?

     EXLUDE (room, during) BY (=, &&)

Yes, I can see how that'd be a bit more confusing. So EXCLUSION  
probably is best.

BTW, is it the case that room maps to = and during maps to && in this  
example? If so, wouldn't it make more sense to combine them?

     EXCLUSION (room WITH =, during WITH &&)

Or am I misunderstanding how this works (quite likely, I'm sure).

Best,

David