Re: operator exclusion constraints - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: operator exclusion constraints
Date
Msg-id 1257558384.27737.574.camel@jdavis
Whole thread Raw
In response to Re: operator exclusion constraints  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: operator exclusion constraints
List pgsql-hackers
On Fri, 2009-11-06 at 19:05 -0500, Tom Lane wrote:
> > CREATE TABLE foo
> > (
> >   exclusion int,
> >   EXCLUSION (exclusion CHECK WITH =)
> > );
>
> Well, it looks like it should be able to work, because left-paren
> can't immediately follow a column name AFAIR.

I agree; I don't think it's ambiguous. The other possibility is the
optional "USING index_method" clause in between, but USING is already
reserved, so I don't see a problem there either.

> Maybe I'm missing
> something.  What's your grammar patch exactly, and what does
> bison -v finger as being the problem?
>

bison -v doesn't show anything useful beyond saying that there is one
shift/reduce conflict. The gram.output is 10MB, which doesn't help me
much (I'm still trying to make sense of it). I'd offer to send it along,
but I'm sure bison would produce the same thing for you.

Patch attached with EXCLUSION as a col_name_keyword and one shift/reduce
conflict.

Regards,
    Jeff Davis

Attachment

pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: plperl and inline functions -- first draft
Next
From: Tom Lane
Date:
Subject: Re: operator exclusion constraints