Re: Window Functions: v07 APIs and buffering strateties - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Window Functions: v07 APIs and buffering strateties
Date
Msg-id 18811.1225198507@sss.pgh.pa.us
Whole thread Raw
In response to Re: Window Functions: v07 APIs and buffering strateties  ("Hitoshi Harada" <umi.tanuki@gmail.com>)
Responses Re: Window Functions: v07 APIs and buffering strateties
List pgsql-hackers
"Hitoshi Harada" <umi.tanuki@gmail.com> writes:
> OK, I'll try to remove it. I'm not used to bison so my first task is
> to find where the conflict is...

Use bison -v to get details of where the conflict is.  I find that
the most common way to fix things is to postpone where the parser
has to make a decision, which usually ends up meaning a slightly
more verbose set of productions --- for instance instead of
foo: bar opt_baz
opt_baz: baz | /*EMPTY*/

you might have to do
foo: bar baz | bar

(which is actually shorter in this pseudo-example, but wouldn't be
if bar were complicated or foo had a lot of alternatives already).
The reason this can fix it is that the parser doesn't have to commit
to which case applies until after it's read the tokens for baz.
In the first form, it has to decide whether baz is there or not
without looking any further ahead than the first token of baz.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: VACUUMs and WAL
Next
From: Heikki Linnakangas
Date:
Subject: Re: Visibility map, partial vacuums