From c4b2a49329e09594c1f659684a77233b89eb3477 Mon Sep 17 00:00:00 2001 From: Henson Choi Date: Sun, 28 Jun 2026 13:28:13 +0900 Subject: [PATCH] Restore funcname guard in WinCheckAndInitializeNullTreatment This unreachable-branch removal is unrelated to row pattern recognition; revert it to keep the RPR diff minimal. --- src/backend/executor/nodeWindowAgg.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/backend/executor/nodeWindowAgg.c b/src/backend/executor/nodeWindowAgg.c index 7d38770a7a1..8a78cb94948 100644 --- a/src/backend/executor/nodeWindowAgg.c +++ b/src/backend/executor/nodeWindowAgg.c @@ -4947,11 +4947,12 @@ WinCheckAndInitializeNullTreatment(WindowObject winobj, { const char *funcname = get_func_name(fcinfo->flinfo->fn_oid); - /* the executing function's name always resolves; stay safe regardless */ + if (!funcname) + elog(ERROR, "could not get function name"); ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("function %s does not allow RESPECT/IGNORE NULLS", - funcname ? funcname : "?"))); + funcname))); } else if (winobj->ignore_nulls == PARSER_IGNORE_NULLS) winobj->ignore_nulls = IGNORE_NULLS;