From 3810e066125edc2bb69b157434b6e4febb4ded12 Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Mon, 28 Nov 2022 18:45:59 +0100 Subject: [PATCH v28 7/8] rename PlannedStmt->rtepermlist -> rtablePermInfos --- src/backend/executor/execMain.c | 6 +++--- src/backend/executor/execParallel.c | 2 +- src/backend/optimizer/plan/planner.c | 2 +- src/include/nodes/parsenodes.h | 4 ++-- src/include/nodes/plannodes.h | 6 +++--- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c index 6a4fad3aaa..b357d05090 100644 --- a/src/backend/executor/execMain.c +++ b/src/backend/executor/execMain.c @@ -765,7 +765,7 @@ ExecCheckXactReadOnly(PlannedStmt *plannedstmt) * Fail if write permissions are requested in parallel mode for table * (temp or non-temp), otherwise fail for any non-temp table. */ - foreach(l, plannedstmt->rtepermlist) + foreach(l, plannedstmt->permInfos) { RTEPermissionInfo *perminfo = lfirst_node(RTEPermissionInfo, l); @@ -806,8 +806,8 @@ InitPlan(QueryDesc *queryDesc, int eflags) /* * Do permissions checks and save the list for later use. */ - ExecCheckPermissions(rangeTable, plannedstmt->rtepermlist, true); - estate->es_rtepermlist = plannedstmt->rtepermlist; + ExecCheckPermissions(rangeTable, plannedstmt->permInfos, true); + estate->es_rtepermlist = plannedstmt->permInfos; /* * initialize the node's execution state diff --git a/src/backend/executor/execParallel.c b/src/backend/executor/execParallel.c index c1c5439fa1..2ee84f7612 100644 --- a/src/backend/executor/execParallel.c +++ b/src/backend/executor/execParallel.c @@ -184,7 +184,7 @@ ExecSerializePlan(Plan *plan, EState *estate) pstmt->parallelModeNeeded = false; pstmt->planTree = plan; pstmt->rtable = estate->es_range_table; - pstmt->rtepermlist = estate->es_rtepermlist; + pstmt->permInfos = estate->es_rtepermlist; pstmt->resultRelations = NIL; pstmt->appendRelations = NIL; diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c index 5cddc9d6cf..0bf772d4ee 100644 --- a/src/backend/optimizer/plan/planner.c +++ b/src/backend/optimizer/plan/planner.c @@ -523,7 +523,7 @@ standard_planner(Query *parse, const char *query_string, int cursorOptions, result->parallelModeNeeded = glob->parallelModeNeeded; result->planTree = top_plan; result->rtable = glob->finalrtable; - result->rtepermlist = glob->finalrtepermlist; + result->permInfos = glob->finalrtepermlist; result->resultRelations = glob->resultRelations; result->appendRelations = glob->appendRelations; result->subplans = glob->subplans; diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h index 6fef3bbd81..c8a0d6cacc 100644 --- a/src/include/nodes/parsenodes.h +++ b/src/include/nodes/parsenodes.h @@ -1027,8 +1027,8 @@ typedef struct RangeTblEntry * avoid getting an additional, lesser lock. * * perminfoindex is 1-based index of the RTEPermissionInfo belonging to - * this RTE in the containing query's rtepermlist; 0 if permissions need - * not be checked for the RTE. + * this RTE in the containing struct's list of same; 0 if permissions need + * not be checked for this RTE. */ Oid relid; /* OID of the relation */ char relkind; /* relation kind (see pg_class.relkind) */ diff --git a/src/include/nodes/plannodes.h b/src/include/nodes/plannodes.h index 9c54cbbc1d..2b93709a25 100644 --- a/src/include/nodes/plannodes.h +++ b/src/include/nodes/plannodes.h @@ -72,12 +72,12 @@ typedef struct PlannedStmt List *rtable; /* list of RangeTblEntry nodes */ + List *permInfos; /* list of RTEPermissionInfo nodes for rtable + * entries needing one */ + /* rtable indexes of target relations for INSERT/UPDATE/DELETE/MERGE */ List *resultRelations; /* integer list of RT indexes, or NIL */ - List *rtepermlist; /* list of RTEPermissionInfo nodes for the - * rtable entries having perminfoindex > 0 */ - List *appendRelations; /* list of AppendRelInfo nodes */ List *subplans; /* Plan trees for SubPlan expressions; note -- 2.30.2