mirror of
https://github.com/postgres/postgres.git
synced 2025-06-30 21:42:05 +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:
@ -1087,8 +1087,7 @@ DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId,
|
||||
}
|
||||
|
||||
attmap = convert_tuples_by_name_map(RelationGetDescr(rel),
|
||||
RelationGetDescr(parent),
|
||||
gettext_noop("could not convert row type"));
|
||||
RelationGetDescr(parent));
|
||||
idxstmt =
|
||||
generateClonedIndexStmt(NULL, idxRel,
|
||||
attmap, RelationGetDescr(rel)->natts,
|
||||
@ -8171,8 +8170,7 @@ addFkRecurseReferenced(List **wqueue, Constraint *fkconstraint, Relation rel,
|
||||
* definition to match the partition's column layout.
|
||||
*/
|
||||
map = convert_tuples_by_name_map_if_req(RelationGetDescr(partRel),
|
||||
RelationGetDescr(pkrel),
|
||||
gettext_noop("could not convert row type"));
|
||||
RelationGetDescr(pkrel));
|
||||
if (map)
|
||||
{
|
||||
mapped_pkattnum = palloc(sizeof(AttrNumber) * numfks);
|
||||
@ -8314,8 +8312,7 @@ addFkRecurseReferencing(List **wqueue, Constraint *fkconstraint, Relation rel,
|
||||
CheckTableNotInUse(partition, "ALTER TABLE");
|
||||
|
||||
attmap = convert_tuples_by_name_map(RelationGetDescr(partition),
|
||||
RelationGetDescr(rel),
|
||||
gettext_noop("could not convert row type"));
|
||||
RelationGetDescr(rel));
|
||||
for (int j = 0; j < numfks; j++)
|
||||
mapped_fkattnum[j] = attmap[fkattnum[j] - 1];
|
||||
|
||||
@ -8505,8 +8502,7 @@ CloneFkReferenced(Relation parentRel, Relation partitionRel)
|
||||
table_close(pg_constraint, RowShareLock);
|
||||
|
||||
attmap = convert_tuples_by_name_map(RelationGetDescr(partitionRel),
|
||||
RelationGetDescr(parentRel),
|
||||
gettext_noop("could not convert row type"));
|
||||
RelationGetDescr(parentRel));
|
||||
foreach(cell, clone)
|
||||
{
|
||||
Oid constrOid = lfirst_oid(cell);
|
||||
@ -8642,8 +8638,7 @@ CloneFkReferencing(List **wqueue, Relation parentRel, Relation partRel)
|
||||
* different. This map is used to convert them.
|
||||
*/
|
||||
attmap = convert_tuples_by_name_map(RelationGetDescr(partRel),
|
||||
RelationGetDescr(parentRel),
|
||||
gettext_noop("could not convert row type"));
|
||||
RelationGetDescr(parentRel));
|
||||
|
||||
partFKs = copyObject(RelationGetFKeyList(partRel));
|
||||
|
||||
@ -10473,8 +10468,7 @@ ATPrepAlterColumnType(List **wqueue,
|
||||
cmd = copyObject(cmd);
|
||||
|
||||
attmap = convert_tuples_by_name_map(RelationGetDescr(childrel),
|
||||
RelationGetDescr(rel),
|
||||
gettext_noop("could not convert row type"));
|
||||
RelationGetDescr(rel));
|
||||
((ColumnDef *) cmd->def)->cooked_default =
|
||||
map_variable_attnos(def->cooked_default,
|
||||
1, 0,
|
||||
@ -15845,8 +15839,7 @@ AttachPartitionEnsureIndexes(Relation rel, Relation attachrel)
|
||||
/* construct an indexinfo to compare existing indexes against */
|
||||
info = BuildIndexInfo(idxRel);
|
||||
attmap = convert_tuples_by_name_map(RelationGetDescr(attachrel),
|
||||
RelationGetDescr(rel),
|
||||
gettext_noop("could not convert row type"));
|
||||
RelationGetDescr(rel));
|
||||
constraintOid = get_relation_idx_constraint_oid(RelationGetRelid(rel), idx);
|
||||
|
||||
/*
|
||||
@ -16422,8 +16415,7 @@ ATExecAttachPartitionIdx(List **wqueue, Relation parentIdx, RangeVar *name)
|
||||
childInfo = BuildIndexInfo(partIdx);
|
||||
parentInfo = BuildIndexInfo(parentIdx);
|
||||
attmap = convert_tuples_by_name_map(RelationGetDescr(partTbl),
|
||||
RelationGetDescr(parentTbl),
|
||||
gettext_noop("could not convert row type"));
|
||||
RelationGetDescr(parentTbl));
|
||||
if (!CompareIndexInfo(childInfo, parentInfo,
|
||||
partIdx->rd_indcollation,
|
||||
parentIdx->rd_indcollation,
|
||||
|
Reference in New Issue
Block a user