diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2019-09-03 14:47:29 -0400 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2019-09-03 14:47:29 -0400 |
commit | fe66125974c58cc749ba441ff53e72216c819da0 (patch) | |
tree | 0d7f9816bc4ce1a333223586453180d1d062cdad /src/backend/commands | |
parent | 10f55448965f9af3a62070dce840c5c701561630 (diff) | |
download | postgresql-fe66125974c58cc749ba441ff53e72216c819da0.tar.gz postgresql-fe66125974c58cc749ba441ff53e72216c819da0.zip |
Remove 'msg' parameter from convert_tuples_by_name
The message was included as a parameter when this function was added in
dcb2bda9b704, 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
Diffstat (limited to 'src/backend/commands')
-rw-r--r-- | src/backend/commands/analyze.c | 3 | ||||
-rw-r--r-- | src/backend/commands/indexcmds.c | 3 | ||||
-rw-r--r-- | src/backend/commands/tablecmds.c | 24 |
3 files changed, 10 insertions, 20 deletions
diff --git a/src/backend/commands/analyze.c b/src/backend/commands/analyze.c index 92285e848f5..d2fdf447b65 100644 --- a/src/backend/commands/analyze.c +++ b/src/backend/commands/analyze.c @@ -1356,8 +1356,7 @@ acquire_inherited_sample_rows(Relation onerel, int elevel, TupleConversionMap *map; map = convert_tuples_by_name(RelationGetDescr(childrel), - RelationGetDescr(onerel), - gettext_noop("could not convert row type")); + RelationGetDescr(onerel)); if (map != NULL) { int j; diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c index ef953953711..147775558c1 100644 --- a/src/backend/commands/indexcmds.c +++ b/src/backend/commands/indexcmds.c @@ -1086,8 +1086,7 @@ DefineIndex(Oid relationId, childidxs = RelationGetIndexList(childrel); attmap = convert_tuples_by_name_map(RelationGetDescr(childrel), - parentDesc, - gettext_noop("could not convert row type")); + parentDesc); maplen = parentDesc->natts; foreach(cell, childidxs) diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index cceefbdd49f..decd1bbeb8c 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -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, |