Re: operator exclusion constraints - Mailing list pgsql-hackers

From Tom Lane
Subject Re: operator exclusion constraints
Date
Msg-id 3441.1257537591@sss.pgh.pa.us
Whole thread Raw
In response to Re: operator exclusion constraints  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: operator exclusion constraints
List pgsql-hackers
Jeff Davis <pgsql@j-davis.com> writes:
> On Fri, 2009-11-06 at 14:00 -0500, Tom Lane wrote:
>> The main advantage of the CHECK WITH syntax in my eyes was that it
>> avoided the need to create a new reserved word.

> It still needs the EXCLUSION keyword, though, and where does that fit
> in? If I include it as unreserved, I get shift/reduce conflicts. If I
> include it as a type_func_name keyword, it works.

If you could get it down to col_name_keyword, I wouldn't complain.

Most of the problems we've had with having to reserve keywords in CREATE
TABLE stem from the fact that they can follow a DEFAULT expression.
If we restrict this thing to being a table constraint, not a column
constraint, it seems like the issue might go away (and in fact I think
you might not even need col_name_keyword).  As long as we are explicitly
specifying column names in the exclusion expressions, I don't think it's
very sensible to write it as a column constraint anyway.  Have you
tried that approach?
        regards, tom lane


pgsql-hackers by date:

Previous
From: abindra@u.washington.edu
Date:
Subject: Re: Freebsd & autoconf-2.63
Next
From: Tom Lane
Date:
Subject: Specific names for plpgsql variable-resolution control options?