From 9c7dd893ff7c625284847783686568462de6a853 Mon Sep 17 00:00:00 2001 From: Ayush Tiwari Date: Thu, 18 Jun 2026 08:16:41 +0530 Subject: [PATCH] Fix two incorrect code comments parse_func.c spelled "TREATMENT" as "TREATEMENT" in the comment describing the RESPECT/IGNORE NULLS check added by 4e5920e6de8. stashfuncs.c's pg_set_stashed_advice() comment claimed the delete path is taken when "the second argument is NULL", but the code keys the delete off PG_ARGISNULL(2), i.e. the third argument (advice_string). Refer to the advice string explicitly so the comment matches the code. --- contrib/pg_stash_advice/stashfuncs.c | 6 +++--- src/backend/parser/parse_func.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/pg_stash_advice/stashfuncs.c b/contrib/pg_stash_advice/stashfuncs.c index d7aa9f2223f..a70df60579b 100644 --- a/contrib/pg_stash_advice/stashfuncs.c +++ b/contrib/pg_stash_advice/stashfuncs.c @@ -266,9 +266,9 @@ pg_get_advice_stash_contents(PG_FUNCTION_ARGS) * SQL-callable function to update an advice stash entry for a particular * query ID * - * If the second argument is NULL, we delete any existing advice stash - * entry; otherwise, we either create an entry or update it with the new - * advice string. + * If the advice string (the third argument) is NULL, we delete any existing + * advice stash entry; otherwise, we either create an entry or update it with + * the new advice string. */ Datum pg_set_stashed_advice(PG_FUNCTION_ARGS) diff --git a/src/backend/parser/parse_func.c b/src/backend/parser/parse_func.c index 860767a52ee..66b2f0435c7 100644 --- a/src/backend/parser/parse_func.c +++ b/src/backend/parser/parse_func.c @@ -354,7 +354,7 @@ ParseFuncOrColumn(ParseState *pstate, List *funcname, List *fargs, } /* - * NULL TREATEMENT is only allowed for window functions per spec. + * NULL TREATMENT is only allowed for window functions per spec. */ if (fdresult != FUNCDETAIL_WINDOWFUNC && ignore_nulls != NO_NULLTREATMENT) ereport(ERROR, -- 2.34.1