Search Postgresql Archives

Re: SQLSTATE code for duplicate constraint

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dan Langille <dan@xxxxxxxxxxxx> writes:
> What error code would be raised for a duplicate index name?

regression=# \set VERBOSITY verbose
regression=# create table t1 (f1 int);
CREATE TABLE
regression=# create index t1i on t1(f1);
CREATE INDEX
regression=# create index t1i on t1(f1);
ERROR:  42P07: relation "t1i" already exists
LOCATION:  index_create, index.c:567

Evidently it's ERRCODE_DUPLICATE_TABLE.

			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux