Re: operator exclusion constraints

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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-07 01:46:24
Message-ID: 1257558384.27737.574.camel@jdavis
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
grammar.diff text/x-patch 3.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-11-07 02:20:12 Re: operator exclusion constraints
Previous Message Andrew Dunstan 2009-11-07 01:20:34 Re: plperl and inline functions -- first draft