Improve wording of error message added in commit 714805010.
authorTom Lane <[email protected]>
Tue, 26 Sep 2017 19:25:56 +0000 (15:25 -0400)
committerTom Lane <[email protected]>
Tue, 26 Sep 2017 19:25:56 +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 1248b2ee5c0b76aab19ad05b7072e1345651bcf4..283845cf2a6eedbed4aa4d962278080362885cd2 100644 (file)
@@ -396,7 +396,7 @@ do_analyze_rel(Relation onerel, int options, VacuumParams *params,
            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 a16f26da7e7d4d1848fbd5cab075486da302d8ef..ced53ca9aaf5c18c92ba8da7cc7ef78f13e8835d 100644 (file)
@@ -92,7 +92,7 @@ VACUUM (FULL) vacparted;
 VACUUM (FREEZE) vacparted;
 -- check behavior with duplicate column mentions
 VACUUM ANALYZE vacparted(a,b,a);
-ERROR:  column "a" of relation "vacparted" is specified twice
+ERROR:  column "a" of relation "vacparted" appears more than once
 ANALYZE vacparted(a,b,b);
-ERROR:  column "b" of relation "vacparted" is specified twice
+ERROR:  column "b" of relation "vacparted" appears more than once
 DROP TABLE vacparted;