1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-09 13:09:39 +03:00

Mention the index name in 'could not create unique index' errors,

per suggestion from Rene Gollent.
This commit is contained in:
Tom Lane
2007-10-29 21:31:28 +00:00
parent b17b7fae8c
commit 2aae35d049
3 changed files with 6 additions and 5 deletions

View File

@@ -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.")));
/*