Improve wording of error message added in commit 714805010.
authorTom Lane
Tue, 26 Sep 2017 19:25:57 +0000 (15:25 -0400)
committerTom Lane
Tue, 26 Sep 2017 19:25:57 +0000 (15:25 -0400)
Per suggestions from Peter Eisentraut and David Johnston.
Back-patch, like the previous commit.

Discussion: https://postgr.es/m/[email protected]

src/backend/commands/analyze.c
src/test/regress/expected/vacuum.out

index 4dad36820d032c83cb934c3e8b109df13b5c8650..995b3e1664b63d503ae60557c6a1091abdc81bec 100644 (file)
@@ -396,7 +396,7 @@ do_analyze_rel(Relation onerel, VacuumStmt *vacstmt,
            if (bms_is_member(i, unique_cols))
                ereport(ERROR,
                        (errcode(ERRCODE_DUPLICATE_COLUMN),
-                        errmsg("column \"%s\" of relation \"%s\" is specified twice",
+                        errmsg("column \"%s\" of relation \"%s\" appears more than once",
                                col, RelationGetRelationName(onerel))));
            unique_cols = bms_add_member(unique_cols, i);
 
index bf5034ad68528c81ca8d6e68f9725cbdd31ab86d..fda1b390c09e5d840dd1163d444058d0d32ca72f 100644 (file)
@@ -81,8 +81,8 @@ SQL function "wrap_do_analyze" statement 1
 VACUUM FULL vactst;
 -- check behavior with duplicate column mentions
 VACUUM ANALYZE vaccluster(i,i);
-ERROR:  column "i" of relation "vaccluster" is specified twice
+ERROR:  column "i" of relation "vaccluster" appears more than once
 ANALYZE vaccluster(i,i);
-ERROR:  column "i" of relation "vaccluster" is specified twice
+ERROR:  column "i" of relation "vaccluster" appears more than once
 DROP TABLE vaccluster;
 DROP TABLE vactst;