Re: operator exclusion constraints

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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-07 19:11:43
Message-ID: 603c8f070911071111m1c89ec19i6bb6edf93bae9379@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Nov 7, 2009 at 1:56 PM, Jeff Davis <pgsql(at)j-davis(dot)com> wrote:
> On Fri, 2009-11-06 at 21:23 -0500, Tom Lane wrote:
>> Or maybe forget about it and go to EXCLUDE or EXCLUDING?
>
> I left it as EXCLUSION for now. "EXCLUDING USING ..." and "EXCLUSIVE
> USING ..." both sound a little awkward to me. Either could be improved
> by moving the USING clause around, but that just creates more grammar
> headaches.
>
> EXCLUDE probably flows most nicely with the optional USING clause or
> without. My only complaint was that it's a transitive verb, so it seems
> to impart more meaning than it actually can. I doubt anyone would
> actually be more confused in practice, though. If a couple of people
> agree, I'll change it to EXCLUDE.

Personally, I think that this is all rather a matter of opinion, and
of course bikeshedding. CHECK is a verb, which might suggest that
EXCLUDE is the best choice, and it has a nice declarative sound to it.
But the other example is FOREIGN KEY, which is not a verb at all,
which seems to me to more closely parallel EXCLUSION or perhaps
EXCLUDING. I think I like EXCLUSIVE the least of the four, but at the
end of the day, I don't think we can really go far wrong.

I also don't think there's anything wrong with EXCLUDING USING, nor
anything more wrong EXCLUSIVE USING than there is with EXCLUSIVE
alone. Nor do I think there's any problem with EXCLUDE being
transitive because, of course, we're going to follow it with a
description of what we want to exclude, which may be thought of as its
direct object. Once again, I don't think we can go far wrong.

Honestly, I'd probably be in favor of breaking the virtual tie in
favor of whichever word is already a keyword, rather than trying to
decide on (IMHO extremely tenuous) grammatical grounds. But I can't
get worked up about that one way or the other either.

...Robert

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David E. Wheeler 2009-11-07 19:28:48 Re: operator exclusion constraints
Previous Message Tom Lane 2009-11-07 19:08:25 Re: operator exclusion constraints