Re: Request for Patch Feedback: Lag & Lead Window Functions Can Ignore Nulls - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Request for Patch Feedback: Lag & Lead Window Functions Can Ignore Nulls
Date
Msg-id CA+Tgmoaps9umoDpWid36506uH-7WQMZrc+Fdckx2XuJwitMeag@mail.gmail.com
Whole thread Raw
In response to Re: Request for Patch Feedback: Lag & Lead Window Functions Can Ignore Nulls  (Troels Nielsen <bn.troels@gmail.com>)
Responses Re: Request for Patch Feedback: Lag & Lead Window Functions Can Ignore Nulls  (Nicholas White <n.j.white@gmail.com>)
List pgsql-hackers
On Fri, Jun 21, 2013 at 6:29 PM, Troels Nielsen <bn.troels@gmail.com> wrote:
> The grammar conflict appears to be because of ambiguities in:
> 1. table_ref (used exclusively in FROM clauses)
> 2. index_elem (used exclusively in INDEX creation statements).
>
> Now, this doesn't seem to make much sense, as AFAICT window functions
> are explicitly disallowed in these contexts (transformWindowFuncCall
> will yield errors, and I can't really wrap my head around what a
> window function call would mean there).
>
> I therefore propose a simple rearrangement of the grammar,
> syntactically disallowing window functions in the outer part of those
> contexts (a_expr's inside can't and shouldn't be done much about)
> which will allow both RESPECT and IGNORE to become unreserved
> keywords, without doing any lexer hacking or abusing the grammar.

I reviewed this today and I think this is a very nice approach.
Thanks for working on it!

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [9.4 CF 1] The Commitfest Slacker List
Next
From: Szymon Guz
Date:
Subject: Re: [9.4 CF 1] The Commitfest Slacker List