From 4ca53852c6af568fd5aca25f2dc01593338fc561 Mon Sep 17 00:00:00 2001 From: Tatsuo Ishii Date: Sat, 16 Aug 2025 18:29:23 +0900 Subject: [PATCH v18 2/6] Modify get_windowfunc_expr_helper to handle IGNORE NULLS option. --- src/backend/utils/adt/ruleutils.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c index 3d6e6bdbfd2..4e837d2afea 100644 --- a/src/backend/utils/adt/ruleutils.c +++ b/src/backend/utils/adt/ruleutils.c @@ -11090,7 +11090,12 @@ get_windowfunc_expr_helper(WindowFunc *wfunc, deparse_context *context, get_rule_expr((Node *) wfunc->aggfilter, context, false); } - appendStringInfoString(buf, ") OVER "); + appendStringInfoString(buf, ") "); + + if (wfunc->ignore_nulls == PARSER_IGNORE_NULLS) + appendStringInfoString(buf, "IGNORE NULLS "); + + appendStringInfoString(buf, "OVER "); if (context->windowClause) { -- 2.25.1