Re: Add RESPECT/IGNORE NULLS and FROM FIRST/LAST options - Mailing list pgsql-hackers

From Álvaro Herrera
Subject Re: Add RESPECT/IGNORE NULLS and FROM FIRST/LAST options
Date
Msg-id 202510131113.mvosyuj5dbsp@alvherre.pgsql
Whole thread Raw
In response to Re: Add RESPECT/IGNORE NULLS and FROM FIRST/LAST options  (Tatsuo Ishii <ishii@postgresql.org>)
List pgsql-hackers
On 2025-Oct-13, Tatsuo Ishii wrote:

> Thanks for the review. In addition to the point, I added an assertion
> which is called by all other window function API. Also added check to
> the return value of get_func_name() because it could return NULL. V2
> patch attached.

Hmm, this change made me realize that all or almost all the calls to
get_func_name() would crash if it were to return a NULL value.  I found
no caller that checks the return value for nullness.  I wonder why do we
allow it to return NULL at all ... it might be better to just
elog(ERROR) if the cache entry is not found.  

I think it was already wrong as introduced by 31c775adeb22.

-- 
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/
"La espina, desde que nace, ya pincha" (Proverbio africano)



pgsql-hackers by date:

Previous
From: Xuneng Zhou
Date:
Subject: Re: pgstattuple: Use streaming read API in pgstatindex functions
Next
From: Karina Litskevich
Date:
Subject: Re: doc: Improve description of io_combine_limit and io_max_combine_limit GUCs