Remove unused param rte in set_plain_rel_pathlist
Started by Zhang Mingliabout 3 years ago2 messages
Hi, hackers
Param RangeTblEntry *rte in function set_plain_rel_pathlist is not used at all.
I look at the commit e2fa76d80b(10 years ago), it’s useless since then.
Add a path to remove it.
Regards,
Zhang Mingli
Attachments:
v1-0001-Remove-unused-param-rte-in-set_plain_rel_pathlist.patchapplication/octet-streamDownload
From b8c03437ac5dd4ef0e7d37033efa5c5288730803 Mon Sep 17 00:00:00 2001
From: Zhang Mingli <avamingli@gmail.com>
Date: Sat, 12 Nov 2022 19:06:26 +0800
Subject: [PATCH v1] Remove unused param rte in set_plain_rel_pathlist
---
src/backend/optimizer/path/allpaths.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c
index 4ddaed31a4..ce994bdaa9 100644
--- a/src/backend/optimizer/path/allpaths.c
+++ b/src/backend/optimizer/path/allpaths.c
@@ -85,8 +85,8 @@ static void set_plain_rel_size(PlannerInfo *root, RelOptInfo *rel,
static void create_plain_partial_paths(PlannerInfo *root, RelOptInfo *rel);
static void set_rel_consider_parallel(PlannerInfo *root, RelOptInfo *rel,
RangeTblEntry *rte);
-static void set_plain_rel_pathlist(PlannerInfo *root, RelOptInfo *rel,
- RangeTblEntry *rte);
+static void set_plain_rel_pathlist(PlannerInfo *root, RelOptInfo *rel);
+
static void set_tablesample_rel_size(PlannerInfo *root, RelOptInfo *rel,
RangeTblEntry *rte);
static void set_tablesample_rel_pathlist(PlannerInfo *root, RelOptInfo *rel,
@@ -501,7 +501,7 @@ set_rel_pathlist(PlannerInfo *root, RelOptInfo *rel,
else
{
/* Plain relation */
- set_plain_rel_pathlist(root, rel, rte);
+ set_plain_rel_pathlist(root, rel);
}
break;
case RTE_SUBQUERY:
@@ -766,7 +766,7 @@ set_rel_consider_parallel(PlannerInfo *root, RelOptInfo *rel,
* Build access paths for a plain relation (no subquery, no inheritance)
*/
static void
-set_plain_rel_pathlist(PlannerInfo *root, RelOptInfo *rel, RangeTblEntry *rte)
+set_plain_rel_pathlist(PlannerInfo *root, RelOptInfo *rel)
{
Relids required_outer;
--
2.34.1
Import Notes
Reply to msg id not found: e93595ee-e092-4a29-af42-e37aba15f9e8@SparkReference msg id not found: e93595ee-e092-4a29-af42-e37aba15f9e8@Spark
Re: Remove unused param rte in set_plain_rel_pathlist
Zhang Mingli <zmlpostgres@gmail.com> writes:
Param RangeTblEntry *rte in function set_plain_rel_pathlist is not used at all.
Add a path to remove it.
I'm disinclined to change that, as it'd make set_plain_rel_pathlist
different from its sibling functions, which do need the RTE.
In practice this has cost zero anyway, since set_plain_rel_pathlist
will surely get inlined into its sole caller.
regards, tom lane