v16-0004-Remove-setup_append_rel_entry.patch
application/octet-stream
Filename: v16-0004-Remove-setup_append_rel_entry.patch
Type: application/octet-stream
Part: 3
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 v16-0004
Subject: Remove setup_append_rel_entry()
| File | + | − |
|---|---|---|
| src/backend/optimizer/prep/prepunion.c | 1 | 22 |
From ae122f049f61a034ef961f3e75275abf20f2699d Mon Sep 17 00:00:00 2001
From: Yuya Watari <watari.yuya@gmail.com>
Date: Mon, 6 Feb 2023 09:25:24 +0900
Subject: [PATCH v16 4/5] Remove setup_append_rel_entry()
---
src/backend/optimizer/prep/prepunion.c | 23 +----------------------
1 file changed, 1 insertion(+), 22 deletions(-)
diff --git a/src/backend/optimizer/prep/prepunion.c b/src/backend/optimizer/prep/prepunion.c
index 938a1f581c..31e5ed2c10 100644
--- a/src/backend/optimizer/prep/prepunion.c
+++ b/src/backend/optimizer/prep/prepunion.c
@@ -45,7 +45,7 @@
#include "utils/selfuncs.h"
#include "utils/syscache.h"
-static void setup_append_rel_entry(PlannerInfo *root);
+
static RelOptInfo *recurse_set_operations(Node *setOp, PlannerInfo *root,
List *colTypes, List *colCollations,
bool junkOK,
@@ -150,8 +150,6 @@ plan_set_operations(PlannerInfo *root)
leftmostQuery = leftmostRTE->subquery;
Assert(leftmostQuery != NULL);
- setup_append_rel_entry(root);
-
/*
* If the topmost node is a recursive union, it needs special processing.
*/
@@ -183,25 +181,6 @@ plan_set_operations(PlannerInfo *root)
return setop_rel;
}
-/*
- * setup_append_rel_entry
- * Add entry into root's simple_rel_array at element 0. This is required
- * because generate_append_tlist() makes Vars with varno=0. In
- * add_eq_member() we need to index EquivalenceMembers belonging to this
- * relation.
- */
-static void
-setup_append_rel_entry(PlannerInfo *root)
-{
- RelOptInfo *rel = makeNode(RelOptInfo);
-
- memset(rel, 0, sizeof(RelOptInfo));
-
- /* make sure nothing else has made use of this element */
- Assert(root->simple_rel_array[0] == NULL);
- root->simple_rel_array[0] = rel;
-}
-
/*
* recurse_set_operations
* Recursively handle one step in a tree of set operations
--
2.35.3.windows.1