Re: Window Functions: v07 APIs and buffering strateties

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

Thanks for your advice. And I found the problem is around FRAME
clause. Now my question is:

Can "ROWS" be reserved_keyword?

In window specifications, we have

OVER (ORDER BY expr_list [(ROWS|RANGE) ... ])

and currently "ROWS" is not reserved so bison is confused with cases
of "ROWS" included in expr_list and in FRAME clause. Because there is
no delimiter between ORDER BY clause and FRAME (that is (ROWS |
RANGE)) clause, "ROWS" can be in expr_list as a_expr. I see "ROWS" has
been an unreserved keyword and that many places in gram.y such cases
have been avoided by other haking methods, but in this case, isn't it
possible such? If I missed something let me know it.

Regards,


-- 
Hitoshi Harada


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Updating FSM on recovery
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Window Functions: v07 APIs and buffering strateties