Which it is, of course.
But being standards-compliant is both better ideologically and more elegant in practice.
-
-
Replying to @pg_xocolatl
Yes. And IGNORE NULLS is a standard. Surely, this has been requested as an addition before? Can we upvote it?
1 reply 0 retweets 0 likes -
Replying to @lukaseder1 reply 0 retweets 0 likes
-
-
Replying to @lukaseder
IIRC, the issue was parsing ambiguity with the word FROM. Hopefully the original author or someone else will pick up the patch.
1 reply 0 retweets 0 likes -
Replying to @pg_xocolatl
Hmm, how could there be an ambiguity? The IGNORE NULLS tokens are placed after a window function (FIRST_VALUE, LAST_VALUE, LEAD, LAG) and before the mandatory OVER keyword, so FROM is not a valid token there anyway...
1 reply 0 retweets 0 likes -
Replying to @lukaseder
Because PostgreSQL is generic and doesn't recognize FIRST_VALUE() as anything special until it sees the OVER. We can also name tables "last" and "over" so SELECT custom_window_func() FROM LAST OVER () ... requires a lot more lookahead than we currently have.
1 reply 0 retweets 0 likes -
Replying to @pg_xocolatl
But there's an OVER lookahead, so why not use that to also look ahead for <null treatment>? Some RDBMS implemented non standard syntax: first_value(x ignore nulls) or even first_value(x, 'IGNORE NULLS') But I guess that's also not an option :)
2 replies 0 retweets 0 likes -
Replying to @lukaseder @pg_xocolatl
I discuss the syntax problems at some length in the mail thread linked from that commitfest entry. IGNORE NULLs isn't the worst case; that patch also attempted to do "nth_value(...) from last" which as far as I can tell needs no less than 4 lookahead tokens
1 reply 0 retweets 0 likes -
Replying to @RhodiumToad @lukaseder
Do we have to do both in the same patch or can we split out IGNORE NULLS and already have that? FROM LAST would be nice but surely we can just sort the other direction for now.
2 replies 0 retweets 1 like
No, we don't have to do both.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.