Re: operator exclusion constraints

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

Jeff Davis <pgsql(at)j-davis(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-11-06 20:21:30 Specific names for plpgsql variable-resolution control options?
Previous Message Tom Lane 2009-11-06 19:47:58 WHERE CURRENT OF $n still needed?