Re: Window Functions: v07 APIs and buffering strateties

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Window Functions: v07 APIs and buffering strateties
Дата
Msg-id 18811.1225198507@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Window Functions: v07 APIs and buffering strateties  ("Hitoshi Harada" <umi.tanuki@gmail.com>)
Ответы Re: Window Functions: v07 APIs and buffering strateties  ("Hitoshi Harada" <umi.tanuki@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Hannu Krosing
Дата:
Сообщение: Re: VACUUMs and WAL
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Visibility map, partial vacuums