Re: operator exclusion constraints

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jeff Davis <pgsql(at)j-davis(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: operator exclusion constraints
Date: 2009-11-14 17:55:01
Message-ID: 603c8f070911140955p1fcd20b6taac4762c6730a281@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Nov 14, 2009 at 12:11 PM, David E. Wheeler <david(at)kineticode(dot)com> wrote:
> On Nov 14, 2009, at 8:55 AM, Tom Lane wrote:
>
>>> I've been meaning to comment on this syntax one more time; apologies for the bike-shedding. But I'm wondering if the "CHECK" is strictly necessary there, since the WITH seems adequate, and there was some discussion before about the CHECK keyword possibly causing confusion with check constraints.
>>
>> I had been manfully restraining myself from re-opening this discussion,
>> but yeah I was thinking the same thing.  The original objection to using
>> just WITH was that it wasn't very clear what you were doing "with" the
>> operator; but that was back when we had a different initial keyword for
>> the construct.  EXCLUDE ... WITH ... seems to match up pretty naturally.
>
> You're more man than I, Tom, but yeah, with EXCLUDE, WITH works well on its own, methinks.

I haven't thought about this too deeply, but could we allow the "with
=" part to be optional? And would it be a good idea? Seems like you
would commonly have one or more keys that exclude on equality and then
the last one would use an overlap-type operator.

...Robert

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2009-11-14 18:00:09 Re: operator exclusion constraints
Previous Message Roger Leigh 2009-11-14 17:40:24 Re: Unicode UTF-8 table formatting for psql text output