Re: Add RESPECT/IGNORE NULLS and FROM FIRST/LAST options
Tatsuo Ishii <ishii@postgresql.org>
From: Tatsuo Ishii <ishii@postgresql.org>
To: alvherre@kurilemu.de
Cc: li.evan.chao@gmail.com, tgl@sss.pgh.pa.us, pramsey@cleverelephant.ca,
ojford@gmail.com, peter@eisentraut.org, krasiyan@gmail.com,
vik@postgresfriends.org, andrew@tao11.riddles.org.uk, david@fetter.org,
pgsql-hackers@lists.postgresql.org
Date: 2025-10-14T00:01:00Z
Lists: pgsql-hackers
> 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 agree it's better but what about user defined functions? Some of them might already check the return value to emit their own error messages, I don't know. If so, modifying get_func_name() could break them. Maybe invent something like get_func_name_with_error(calling elog(ERROR)) and gradually update our code? Best regards, -- Tatsuo Ishii SRA OSS K.K. English: http://www.sraoss.co.jp/index_en/ Japanese:http://www.sraoss.co.jp