mirror of
https://github.com/postgres/postgres.git
synced 2025-07-09 22:41:56 +03:00
Remove 'msg' parameter from convert_tuples_by_name
The message was included as a parameter when this function was added in
dcb2bda9b7
, but I don't think it has ever served any useful purpose.
Let's stop spreading it pointlessly.
Reviewed by Amit Langote and Peter Eisentraut.
Discussion: https://postgr.es/m/20190806224728.GA17233@alvherre.pgsql
This commit is contained in:
@ -3299,9 +3299,7 @@ ExecEvalConvertRowtype(ExprState *state, ExprEvalStep *op, ExprContext *econtext
|
||||
old_cxt = MemoryContextSwitchTo(econtext->ecxt_per_query_memory);
|
||||
|
||||
/* prepare map from old to new attribute numbers */
|
||||
op->d.convert_rowtype.map =
|
||||
convert_tuples_by_name(indesc, outdesc,
|
||||
gettext_noop("could not convert row type"));
|
||||
op->d.convert_rowtype.map = convert_tuples_by_name(indesc, outdesc);
|
||||
op->d.convert_rowtype.initialized = true;
|
||||
|
||||
MemoryContextSwitchTo(old_cxt);
|
||||
|
@ -1861,8 +1861,7 @@ ExecPartitionCheckEmitError(ResultRelInfo *resultRelInfo,
|
||||
|
||||
old_tupdesc = RelationGetDescr(resultRelInfo->ri_RelationDesc);
|
||||
/* a reverse map */
|
||||
map = convert_tuples_by_name_map_if_req(old_tupdesc, tupdesc,
|
||||
gettext_noop("could not convert row type"));
|
||||
map = convert_tuples_by_name_map_if_req(old_tupdesc, tupdesc);
|
||||
|
||||
/*
|
||||
* Partition-specific slot's tupdesc can't be changed, so allocate a
|
||||
@ -1947,8 +1946,7 @@ ExecConstraints(ResultRelInfo *resultRelInfo,
|
||||
tupdesc = RelationGetDescr(rel);
|
||||
/* a reverse map */
|
||||
map = convert_tuples_by_name_map_if_req(orig_tupdesc,
|
||||
tupdesc,
|
||||
gettext_noop("could not convert row type"));
|
||||
tupdesc);
|
||||
|
||||
/*
|
||||
* Partition-specific slot's tupdesc can't be changed, so
|
||||
@ -1997,8 +1995,7 @@ ExecConstraints(ResultRelInfo *resultRelInfo,
|
||||
tupdesc = RelationGetDescr(rel);
|
||||
/* a reverse map */
|
||||
map = convert_tuples_by_name_map_if_req(old_tupdesc,
|
||||
tupdesc,
|
||||
gettext_noop("could not convert row type"));
|
||||
tupdesc);
|
||||
|
||||
/*
|
||||
* Partition-specific slot's tupdesc can't be changed, so
|
||||
@ -2105,8 +2102,7 @@ ExecWithCheckOptions(WCOKind kind, ResultRelInfo *resultRelInfo,
|
||||
tupdesc = RelationGetDescr(rel);
|
||||
/* a reverse map */
|
||||
map = convert_tuples_by_name_map_if_req(old_tupdesc,
|
||||
tupdesc,
|
||||
gettext_noop("could not convert row type"));
|
||||
tupdesc);
|
||||
|
||||
/*
|
||||
* Partition-specific slot's tupdesc can't be changed,
|
||||
|
@ -586,8 +586,7 @@ ExecInitPartitionInfo(ModifyTableState *mtstate, EState *estate,
|
||||
*/
|
||||
part_attnos =
|
||||
convert_tuples_by_name_map(RelationGetDescr(partrel),
|
||||
RelationGetDescr(firstResultRel),
|
||||
gettext_noop("could not convert row type"));
|
||||
RelationGetDescr(firstResultRel));
|
||||
wcoList = (List *)
|
||||
map_variable_attnos((Node *) wcoList,
|
||||
firstVarno, 0,
|
||||
@ -646,8 +645,7 @@ ExecInitPartitionInfo(ModifyTableState *mtstate, EState *estate,
|
||||
if (part_attnos == NULL)
|
||||
part_attnos =
|
||||
convert_tuples_by_name_map(RelationGetDescr(partrel),
|
||||
RelationGetDescr(firstResultRel),
|
||||
gettext_noop("could not convert row type"));
|
||||
RelationGetDescr(firstResultRel));
|
||||
returningList = (List *)
|
||||
map_variable_attnos((Node *) returningList,
|
||||
firstVarno, 0,
|
||||
@ -790,8 +788,7 @@ ExecInitPartitionInfo(ModifyTableState *mtstate, EState *estate,
|
||||
if (part_attnos == NULL)
|
||||
part_attnos =
|
||||
convert_tuples_by_name_map(RelationGetDescr(partrel),
|
||||
RelationGetDescr(firstResultRel),
|
||||
gettext_noop("could not convert row type"));
|
||||
RelationGetDescr(firstResultRel));
|
||||
onconflset = (List *)
|
||||
map_variable_attnos((Node *) onconflset,
|
||||
INNER_VAR, 0,
|
||||
@ -904,8 +901,7 @@ ExecInitRoutingInfo(ModifyTableState *mtstate,
|
||||
*/
|
||||
partrouteinfo->pi_RootToPartitionMap =
|
||||
convert_tuples_by_name(RelationGetDescr(partRelInfo->ri_PartitionRoot),
|
||||
RelationGetDescr(partRelInfo->ri_RelationDesc),
|
||||
gettext_noop("could not convert row type"));
|
||||
RelationGetDescr(partRelInfo->ri_RelationDesc));
|
||||
|
||||
/*
|
||||
* If a partition has a different rowtype than the root parent, initialize
|
||||
@ -937,8 +933,7 @@ ExecInitRoutingInfo(ModifyTableState *mtstate,
|
||||
{
|
||||
partrouteinfo->pi_PartitionToRootMap =
|
||||
convert_tuples_by_name(RelationGetDescr(partRelInfo->ri_RelationDesc),
|
||||
RelationGetDescr(partRelInfo->ri_PartitionRoot),
|
||||
gettext_noop("could not convert row type"));
|
||||
RelationGetDescr(partRelInfo->ri_PartitionRoot));
|
||||
}
|
||||
else
|
||||
partrouteinfo->pi_PartitionToRootMap = NULL;
|
||||
@ -1042,8 +1037,7 @@ ExecInitPartitionDispatchInfo(EState *estate,
|
||||
* routing.
|
||||
*/
|
||||
pd->tupmap = convert_tuples_by_name_map_if_req(RelationGetDescr(parent_pd->reldesc),
|
||||
tupdesc,
|
||||
gettext_noop("could not convert row type"));
|
||||
tupdesc);
|
||||
pd->tupslot = pd->tupmap ?
|
||||
MakeSingleTupleTableSlot(tupdesc, &TTSOpsVirtual) : NULL;
|
||||
}
|
||||
|
@ -1959,8 +1959,7 @@ ExecSetupChildParentMapForSubplan(ModifyTableState *mtstate)
|
||||
{
|
||||
mtstate->mt_per_subplan_tupconv_maps[i] =
|
||||
convert_tuples_by_name(RelationGetDescr(resultRelInfos[i].ri_RelationDesc),
|
||||
outdesc,
|
||||
gettext_noop("could not convert row type"));
|
||||
outdesc);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user