Re: [HACKERS] FOREIGN KEY and shift/reduce

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jan Wieck <wieck(at)debis(dot)com>, PostgreSQL HACKERS <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] FOREIGN KEY and shift/reduce
Date: 1999-12-10 05:31:04
Message-ID: 199912100531.AAA16495@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> > Well, I'm not a guru, but I looked anyway. It's a mess. The problem
> > is that when NOT is the next token, the grammar doesn't know whether
> > the NOT is starting NOT NULL, which would be a new ColConstraintElem,
> > or starting NOT DEFERRABLE, which would be part of the current
> > ColConstraintElem. So it can't decide whether it's time to reduce
> > the current stack contents to a finished ColConstraintElem or not.
> > The only way to do that is to look ahead further than the NOT.
> Tom and I talked about moving NOT DEFERED up into the main level with
> NOT NULL.
>
> In gram.y, line 949 and line, could there be a test that if the last
> List element of $1 is a constraint, and if $2 is NOT DEFERED, we can set
> the bit in $1 and just skip adding the defered node? If not, we can
> throw an error.

Also, I am using flex 2.5.4, and an seeing no shift-reduce errors from
the current gram.y.

--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1999-12-10 05:44:55 6.6 release
Previous Message The Hermit Hacker 1999-12-10 05:30:45 Re: [HACKERS] pgsql web site busted?