Re: Add RESPECT/IGNORE NULLS and FROM FIRST/LAST options

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tatsuo Ishii <ishii(at)postgresql(dot)org>
Cc: ojford(at)gmail(dot)com, peter(at)eisentraut(dot)org, li(dot)evan(dot)chao(at)gmail(dot)com, krasiyan(at)gmail(dot)com, vik(at)postgresfriends(dot)org, andrew(at)tao11(dot)riddles(dot)org(dot)uk, david(at)fetter(dot)org, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Add RESPECT/IGNORE NULLS and FROM FIRST/LAST options
Date: 2025-10-05 16:35:46
Message-ID: 1690746.1759682146@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> ... also that WinGetFuncArgInPartition is dereferencing
> a possibly-null "isout" pointer at several places

Looking around, there is only one in-core caller of
WinGetFuncArgInPartition, and it does pass a valid "isout" pointer,
explaining why this inconsistency wasn't obvious in testing.
There are outside callers though according to Debian Code Search,
and at least PostGIS is one that passes a null pointer.

As Alvaro notes nearby, this function is ridiculously complicated
already. I'm tempted to remove the API allowance for isout == NULL,
and thereby simplify the code slightly, rather than complicate it more
by continuing to allow that. We'd have to warn the PostGIS people
about the API change though.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2025-10-05 16:51:45 Re: Add RESPECT/IGNORE NULLS and FROM FIRST/LAST options
Previous Message Álvaro Herrera 2025-10-05 16:20:30 Re: Add RESPECT/IGNORE NULLS and FROM FIRST/LAST options