Skip to content
Snippets Groups Projects
Commit fbb1966c authored by Bruce Momjian's avatar Bruce Momjian
Browse files

This trivial patches fixes the error message returned by CREATE INDEX

when it finds an existing relation with the same name as the
to-be-created index.

Old error message:

nconway=# create table foo (a int);
CREATE TABLE
nconway=# create index foo on foo (a);
ERROR:  index named "foo" already exists

I replaced 'index' with 'relation' in the error message.

Neil Conway
parent 81dfa2ce
Branches
Tags
No related merge requests found
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.189 2002/08/11 21:17:34 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.190 2002/08/28 20:46:47 momjian Exp $
* *
* *
* INTERFACE ROUTINES * INTERFACE ROUTINES
...@@ -561,7 +561,7 @@ index_create(Oid heapRelationId, ...@@ -561,7 +561,7 @@ index_create(Oid heapRelationId,
elog(ERROR, "Shared indexes cannot be created after initdb"); elog(ERROR, "Shared indexes cannot be created after initdb");
if (get_relname_relid(indexRelationName, namespaceId)) if (get_relname_relid(indexRelationName, namespaceId))
elog(ERROR, "index named \"%s\" already exists", elog(ERROR, "relation named \"%s\" already exists",
indexRelationName); indexRelationName);
/* /*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment