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