mirror of
https://github.com/postgres/postgres.git
synced 2025-10-19 15:49:24 +03:00
Remove partColsUpdated.
This information appears to have been unused since commit
c5b7ba4e67
. We could not find any references in third-party code,
either.
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/aO_CyFRpbVMtgJWM%40nathan
This commit is contained in:
@@ -311,7 +311,6 @@ static ProjectSet *make_project_set(List *tlist, Plan *subplan);
|
|||||||
static ModifyTable *make_modifytable(PlannerInfo *root, Plan *subplan,
|
static ModifyTable *make_modifytable(PlannerInfo *root, Plan *subplan,
|
||||||
CmdType operation, bool canSetTag,
|
CmdType operation, bool canSetTag,
|
||||||
Index nominalRelation, Index rootRelation,
|
Index nominalRelation, Index rootRelation,
|
||||||
bool partColsUpdated,
|
|
||||||
List *resultRelations,
|
List *resultRelations,
|
||||||
List *updateColnosLists,
|
List *updateColnosLists,
|
||||||
List *withCheckOptionLists, List *returningLists,
|
List *withCheckOptionLists, List *returningLists,
|
||||||
@@ -2676,7 +2675,6 @@ create_modifytable_plan(PlannerInfo *root, ModifyTablePath *best_path)
|
|||||||
best_path->canSetTag,
|
best_path->canSetTag,
|
||||||
best_path->nominalRelation,
|
best_path->nominalRelation,
|
||||||
best_path->rootRelation,
|
best_path->rootRelation,
|
||||||
best_path->partColsUpdated,
|
|
||||||
best_path->resultRelations,
|
best_path->resultRelations,
|
||||||
best_path->updateColnosLists,
|
best_path->updateColnosLists,
|
||||||
best_path->withCheckOptionLists,
|
best_path->withCheckOptionLists,
|
||||||
@@ -7010,7 +7008,6 @@ static ModifyTable *
|
|||||||
make_modifytable(PlannerInfo *root, Plan *subplan,
|
make_modifytable(PlannerInfo *root, Plan *subplan,
|
||||||
CmdType operation, bool canSetTag,
|
CmdType operation, bool canSetTag,
|
||||||
Index nominalRelation, Index rootRelation,
|
Index nominalRelation, Index rootRelation,
|
||||||
bool partColsUpdated,
|
|
||||||
List *resultRelations,
|
List *resultRelations,
|
||||||
List *updateColnosLists,
|
List *updateColnosLists,
|
||||||
List *withCheckOptionLists, List *returningLists,
|
List *withCheckOptionLists, List *returningLists,
|
||||||
@@ -7047,7 +7044,6 @@ make_modifytable(PlannerInfo *root, Plan *subplan,
|
|||||||
node->canSetTag = canSetTag;
|
node->canSetTag = canSetTag;
|
||||||
node->nominalRelation = nominalRelation;
|
node->nominalRelation = nominalRelation;
|
||||||
node->rootRelation = rootRelation;
|
node->rootRelation = rootRelation;
|
||||||
node->partColsUpdated = partColsUpdated;
|
|
||||||
node->resultRelations = resultRelations;
|
node->resultRelations = resultRelations;
|
||||||
if (!onconflict)
|
if (!onconflict)
|
||||||
{
|
{
|
||||||
|
@@ -744,7 +744,6 @@ subquery_planner(PlannerGlobal *glob, Query *parse, char *plan_name,
|
|||||||
else
|
else
|
||||||
root->wt_param_id = -1;
|
root->wt_param_id = -1;
|
||||||
root->non_recursive_path = NULL;
|
root->non_recursive_path = NULL;
|
||||||
root->partColsUpdated = false;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Create the top-level join domain. This won't have valid contents until
|
* Create the top-level join domain. This won't have valid contents until
|
||||||
@@ -2127,7 +2126,6 @@ grouping_planner(PlannerInfo *root, double tuple_fraction,
|
|||||||
parse->canSetTag,
|
parse->canSetTag,
|
||||||
parse->resultRelation,
|
parse->resultRelation,
|
||||||
rootRelation,
|
rootRelation,
|
||||||
root->partColsUpdated,
|
|
||||||
resultRelations,
|
resultRelations,
|
||||||
updateColnosLists,
|
updateColnosLists,
|
||||||
withCheckOptionLists,
|
withCheckOptionLists,
|
||||||
|
@@ -335,16 +335,6 @@ expand_partitioned_rtentry(PlannerInfo *root, RelOptInfo *relinfo,
|
|||||||
/* A partitioned table should always have a partition descriptor. */
|
/* A partitioned table should always have a partition descriptor. */
|
||||||
Assert(partdesc);
|
Assert(partdesc);
|
||||||
|
|
||||||
/*
|
|
||||||
* Note down whether any partition key cols are being updated. Though it's
|
|
||||||
* the root partitioned table's updatedCols we are interested in,
|
|
||||||
* parent_updatedCols provided by the caller contains the root partrel's
|
|
||||||
* updatedCols translated to match the attribute ordering of parentrel.
|
|
||||||
*/
|
|
||||||
if (!root->partColsUpdated)
|
|
||||||
root->partColsUpdated =
|
|
||||||
has_partition_attrs(parentrel, parent_updatedCols, NULL);
|
|
||||||
|
|
||||||
/* Nothing further to do here if there are no partitions. */
|
/* Nothing further to do here if there are no partitions. */
|
||||||
if (partdesc->nparts == 0)
|
if (partdesc->nparts == 0)
|
||||||
return;
|
return;
|
||||||
|
@@ -3612,8 +3612,6 @@ create_lockrows_path(PlannerInfo *root, RelOptInfo *rel,
|
|||||||
* 'canSetTag' is true if we set the command tag/es_processed
|
* 'canSetTag' is true if we set the command tag/es_processed
|
||||||
* 'nominalRelation' is the parent RT index for use of EXPLAIN
|
* 'nominalRelation' is the parent RT index for use of EXPLAIN
|
||||||
* 'rootRelation' is the partitioned/inherited table root RTI, or 0 if none
|
* 'rootRelation' is the partitioned/inherited table root RTI, or 0 if none
|
||||||
* 'partColsUpdated' is true if any partitioning columns are being updated,
|
|
||||||
* either from the target relation or a descendent partitioned table.
|
|
||||||
* 'resultRelations' is an integer list of actual RT indexes of target rel(s)
|
* 'resultRelations' is an integer list of actual RT indexes of target rel(s)
|
||||||
* 'updateColnosLists' is a list of UPDATE target column number lists
|
* 'updateColnosLists' is a list of UPDATE target column number lists
|
||||||
* (one sublist per rel); or NIL if not an UPDATE
|
* (one sublist per rel); or NIL if not an UPDATE
|
||||||
@@ -3630,7 +3628,6 @@ create_modifytable_path(PlannerInfo *root, RelOptInfo *rel,
|
|||||||
Path *subpath,
|
Path *subpath,
|
||||||
CmdType operation, bool canSetTag,
|
CmdType operation, bool canSetTag,
|
||||||
Index nominalRelation, Index rootRelation,
|
Index nominalRelation, Index rootRelation,
|
||||||
bool partColsUpdated,
|
|
||||||
List *resultRelations,
|
List *resultRelations,
|
||||||
List *updateColnosLists,
|
List *updateColnosLists,
|
||||||
List *withCheckOptionLists, List *returningLists,
|
List *withCheckOptionLists, List *returningLists,
|
||||||
@@ -3696,7 +3693,6 @@ create_modifytable_path(PlannerInfo *root, RelOptInfo *rel,
|
|||||||
pathnode->canSetTag = canSetTag;
|
pathnode->canSetTag = canSetTag;
|
||||||
pathnode->nominalRelation = nominalRelation;
|
pathnode->nominalRelation = nominalRelation;
|
||||||
pathnode->rootRelation = rootRelation;
|
pathnode->rootRelation = rootRelation;
|
||||||
pathnode->partColsUpdated = partColsUpdated;
|
|
||||||
pathnode->resultRelations = resultRelations;
|
pathnode->resultRelations = resultRelations;
|
||||||
pathnode->updateColnosLists = updateColnosLists;
|
pathnode->updateColnosLists = updateColnosLists;
|
||||||
pathnode->withCheckOptionLists = withCheckOptionLists;
|
pathnode->withCheckOptionLists = withCheckOptionLists;
|
||||||
|
@@ -593,9 +593,6 @@ struct PlannerInfo
|
|||||||
bool *isAltSubplan pg_node_attr(read_write_ignore);
|
bool *isAltSubplan pg_node_attr(read_write_ignore);
|
||||||
bool *isUsedSubplan pg_node_attr(read_write_ignore);
|
bool *isUsedSubplan pg_node_attr(read_write_ignore);
|
||||||
|
|
||||||
/* Does this query modify any partition key columns? */
|
|
||||||
bool partColsUpdated;
|
|
||||||
|
|
||||||
/* PartitionPruneInfos added in this query's plan. */
|
/* PartitionPruneInfos added in this query's plan. */
|
||||||
List *partPruneInfos;
|
List *partPruneInfos;
|
||||||
|
|
||||||
@@ -2609,7 +2606,6 @@ typedef struct ModifyTablePath
|
|||||||
bool canSetTag; /* do we set the command tag/es_processed? */
|
bool canSetTag; /* do we set the command tag/es_processed? */
|
||||||
Index nominalRelation; /* Parent RT index for use of EXPLAIN */
|
Index nominalRelation; /* Parent RT index for use of EXPLAIN */
|
||||||
Index rootRelation; /* Root RT index, if partitioned/inherited */
|
Index rootRelation; /* Root RT index, if partitioned/inherited */
|
||||||
bool partColsUpdated; /* some part key in hierarchy updated? */
|
|
||||||
List *resultRelations; /* integer list of RT indexes */
|
List *resultRelations; /* integer list of RT indexes */
|
||||||
List *updateColnosLists; /* per-target-table update_colnos lists */
|
List *updateColnosLists; /* per-target-table update_colnos lists */
|
||||||
List *withCheckOptionLists; /* per-target-table WCO lists */
|
List *withCheckOptionLists; /* per-target-table WCO lists */
|
||||||
|
@@ -338,8 +338,6 @@ typedef struct ModifyTable
|
|||||||
Index nominalRelation;
|
Index nominalRelation;
|
||||||
/* Root RT index, if partitioned/inherited */
|
/* Root RT index, if partitioned/inherited */
|
||||||
Index rootRelation;
|
Index rootRelation;
|
||||||
/* some part key in hierarchy updated? */
|
|
||||||
bool partColsUpdated;
|
|
||||||
/* integer list of RT indexes */
|
/* integer list of RT indexes */
|
||||||
List *resultRelations;
|
List *resultRelations;
|
||||||
/* per-target-table update_colnos lists */
|
/* per-target-table update_colnos lists */
|
||||||
|
@@ -281,7 +281,6 @@ extern ModifyTablePath *create_modifytable_path(PlannerInfo *root,
|
|||||||
Path *subpath,
|
Path *subpath,
|
||||||
CmdType operation, bool canSetTag,
|
CmdType operation, bool canSetTag,
|
||||||
Index nominalRelation, Index rootRelation,
|
Index nominalRelation, Index rootRelation,
|
||||||
bool partColsUpdated,
|
|
||||||
List *resultRelations,
|
List *resultRelations,
|
||||||
List *updateColnosLists,
|
List *updateColnosLists,
|
||||||
List *withCheckOptionLists, List *returningLists,
|
List *withCheckOptionLists, List *returningLists,
|
||||||
|
Reference in New Issue
Block a user