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)