Re: Add RESPECT/IGNORE NULLS and FROM FIRST/LAST options
Oliver Ford <ojford@gmail.com>
From: Oliver Ford <ojford@gmail.com>
To: Tatsuo Ishii <ishii@sraoss.co.jp>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>, Tom Lane <tgl@sss.pgh.pa.us>, vik@postgresfriends.org, andrew@tao11.riddles.org.uk, David Fetter <david@fetter.org>, Krasiyan Andreev <krasiyan@gmail.com>
Date: 2024-09-07T20:25:28Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix coding style with "else".
- 20628b62e46e 19 (unreleased) landed
-
Fix multi WinGetFuncArgInFrame/Partition calls with IGNORE NULLS.
- 2d7b247cb414 19 (unreleased) landed
-
Fix Coverity issue reported in commit 2273fa32bce.
- dd766a441d69 19 (unreleased) landed
-
Use ereport rather than elog in WinCheckAndInitializeNullTreatment.
- 5f3808646f67 19 (unreleased) landed
-
Avoid uninitialized-variable warnings from older compilers.
- 71540dcdcb22 19 (unreleased) cited
-
Fix Coverity issues reported in commit 25a30bbd423.
- 2273fa32bce7 19 (unreleased) landed
-
Improve EXPLAIN's display of window functions.
- 8b1b342544b6 18.0 cited
-
Automatically generate node support functions
- 964d01ae90c3 16.0 cited
Attachments
- 0001-add-ignore_nulls.patch (application/octet-stream) patch 0001
On Sat, May 6, 2023 at 9:41 AM Oliver Ford <ojford@gmail.com> wrote: > > > > On Sat, 6 May 2023, 04:57 Tatsuo Ishii, <ishii@sraoss.co.jp> wrote: >> >> Attached is the patch to implement this (on top of your patch). >> >> test=# SELECT row_number() RESPECT NULLS OVER () FROM (SELECT 1) AS s; >> ERROR: window function row_number cannot have RESPECT NULLS or IGNORE NULLS > > > The last time this was discussed (https://www.postgresql.org/message-id/1037735.1610402426%40sss.pgh.pa.us) it was suggested to make the feature generalizable, beyond what the standard says it should be limited to. > > With it generalizable, there would need to be extra checks for custom functions, such as if they allow multiple column arguments (which I'll add in v2 of the patch if the design's accepted). > > So I think we need a consensus on whether to stick to limiting it to several specific functions, or making it generalized yet agreeing the rules to limit it (such as no agg functions, and no functions with multiple column arguments). Reviving this thread, I've attached a rebased patch with code, docs, and tests and added it to November commitfest.