Re: Window Functions: v07 APIs and buffering strateties
От | Tom Lane |
---|---|
Тема | Re: Window Functions: v07 APIs and buffering strateties |
Дата | |
Msg-id | 10722.1225220116@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Window Functions: v07 APIs and buffering strateties (Martijn van Oosterhout <kleptog@svana.org>) |
Ответы |
Re: Window Functions: v07 APIs and buffering strateties
|
Список | pgsql-hackers |
Martijn van Oosterhout <kleptog@svana.org> writes: > On Tue, Oct 28, 2008 at 01:50:26PM -0400, Tom Lane wrote: >> ... So it might be possible to fix >> by attaching some new precedence level to the ROWS token. > Yes. Bison's default is to shift, which means that if you do nothing it > will treat ROWS as part of the expression if it makes any sense at all. > Given the requirement for a following UNBOUNDED or BETWEEN, the only > problem is that you'll get a syntax error if the expr_list ends in a > postfix operator, I don't see how you get hidden ambiguity. Hmm, now I see what you meant; that's a little different than what I was envisioning. I was thinking of trying to force a parse decision that would support the windowing syntax, whereas you propose forcing a parse decision that does the opposite, and making the user parenthesize if he's got a conflict. What the choice seems to come down to is making ROWS and RANGE reserved (in some form or other) versus creating a corner case for users of postfix operators. Phrased that way it does seem like the second alternative is better. Hitoshi: you can probably make this happen by including ROWS and RANGE in the %nonassoc IDENT precedence declaration, but you'll want to test to make sure the right things happen. regards, tom lane
В списке pgsql-hackers по дате отправления: