Re: operator exclusion constraints - Mailing list pgsql-hackers

From Tom Lane
Subject Re: operator exclusion constraints
Date
Msg-id 17734.1257534036@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:
> If I put EXCLUSION in the type_func_name keyword list, it works fine.
> But I'm having a little trouble trying to use EXCLUDING or EXCLUSIVE,
> because if I move them from unreserved to any other keyword list, I get
> reduce/reduce conflicts.

> Am I doing something wrong? I would assume that making words more
> reserved would usually not lead to conflicts.

Putting any of these at a higher level than unreserved is problematic
because they are not permitted to be reserved words according to the
SQL spec.  While we do have some nonstandard reserved words, I think
the bar for adding new ones has to be pretty high, because it will break
applications that (a) worked before and (b) are not violating either the
letter or the spirit of the standard.

I'd be less worried about making a new col_name_keyword, but if it has
to be type_func_name_keyword then it's nearly as bad as fully reserved.

The main advantage of the CHECK WITH syntax in my eyes was that it
avoided the need to create a new reserved word.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "David E. Wheeler"
Date:
Subject: Re: operator exclusion constraints
Next
From: Tom Lane
Date:
Subject: Re: operator exclusion constraints