Re: Index name different from constraint name - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Index name different from constraint name
Date
Msg-id 6627.1130340892@sss.pgh.pa.us
Whole thread Raw
In response to Index name different from constraint name  (Stephen Frost <sfrost@snowman.net>)
Responses Re: Index name different from constraint name
List pgsql-bugs
Stephen Frost <sfrost@snowman.net> writes:
> test=> create table a (
> test(>   b    int    primary key
> test(> );
> NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "a_pkey" for=
>  table "a"
> CREATE TABLE
> test=> alter table a rename to c;
> ALTER TABLE
> test=> alter index a_pkey rename to c_pkey;
> ALTER INDEX

Arguably we should forbid ALTER INDEX RENAME on an index that belongs to
a constraint, and make you rename the constraint instead (and have that
implicitly change the index name too).

            regards, tom lane

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #2001: Signal 11 after concurrent inserts + updates
Next
From: Stephen Frost
Date:
Subject: Re: Index name different from constraint name