postgres.git / summary / log / commit / refs

commit    9d0d0fe57cccc81430930957ab12fa270e5351d2
Author:   Tom Lane <tgl@sss.pgh.pa.us>
Date:     Tue Sep 26 19:25:57 2017 +0000
First released in: 11.0, 9.2.24, 9.3.20, 9.4.15, 9.5.10, 9.6.6, 10.0

    Improve wording of error message added in commit 714805010.
    
    Per suggestions from Peter Eisentraut and David Johnston.
    Back-patch, like the previous commit.
    
    Discussion: https://postgr.es/m/E1dv9jI-0006oT-Fn@gemulon.postgresql.org


src/backend/commands/analyze.c | 2 +- src/test/regress/expected/vacuum.out | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/backend/commands/analyze.c b/src/backend/commands/analyze.c index f269e23a285..84a99294e50 100644 --- a/src/backend/commands/analyze.c +++ b/src/backend/commands/analyze.c @@ -393,7 +393,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); diff --git a/src/test/regress/expected/vacuum.out b/src/test/regress/expected/vacuum.out index 6ba8ec93e33..60f6bc2817d 100644 --- a/src/test/regress/expected/vacuum.out +++ b/src/test/regress/expected/vacuum.out @@ -82,8 +82,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; [parent: 2eb84e54a250]