v17-0002-Modify-get_windowfunc_expr_helper-to-handle-IGNO.patch
application/octet-stream
Filename: v17-0002-Modify-get_windowfunc_expr_helper-to-handle-IGNO.patch
Type: application/octet-stream
Part: 1
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: format-patch
Series: patch v17-0002
Subject: Modify get_windowfunc_expr_helper to handle IGNORE NULLS option.
| File | + | − |
|---|---|---|
| src/backend/utils/adt/ruleutils.c | 6 | 1 |
From 37fddc904ea66153e2ead1d40c2337854d61109f Mon Sep 17 00:00:00 2001
From: Tatsuo Ishii <ishii@postgresql.org>
Date: Fri, 25 Jul 2025 16:22:47 +0900
Subject: [PATCH v17 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