summaryrefslogtreecommitdiff
path: root/src/backend/utils/sort
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2007-10-29 21:31:28 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2007-10-29 21:31:28 +0000
commit2aae35d049274b6364aa01add629c33a1e2e6089 (patch)
tree5de315330bd9a39931704d4f67d26d803411eb64 /src/backend/utils/sort
parentb17b7fae8c1418f924915348afaa2250d1360bc4 (diff)
downloadpostgresql-2aae35d049274b6364aa01add629c33a1e2e6089.tar.gz
Mention the index name in 'could not create unique index' errors,
per suggestion from Rene Gollent.
Diffstat (limited to 'src/backend/utils/sort')
-rw-r--r--src/backend/utils/sort/tuplesort.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/backend/utils/sort/tuplesort.c b/src/backend/utils/sort/tuplesort.c
index 815dd2158d..0c63d1e142 100644
--- a/src/backend/utils/sort/tuplesort.c
+++ b/src/backend/utils/sort/tuplesort.c
@@ -91,7 +91,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/sort/tuplesort.c,v 1.78 2007/09/01 18:47:39 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/sort/tuplesort.c,v 1.79 2007/10/29 21:31:28 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -2720,7 +2720,8 @@ comparetup_index(const SortTuple *a, const SortTuple *b, Tuplesortstate *state)
if (state->enforceUnique && !equal_hasnull && tuple1 != tuple2)
ereport(ERROR,
(errcode(ERRCODE_UNIQUE_VIOLATION),
- errmsg("could not create unique index"),
+ errmsg("could not create unique index \"%s\"",
+ RelationGetRelationName(state->indexRel)),
errdetail("Table contains duplicated values.")));
/*