Re: Index name different from constraint name

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Index name different from constraint name
Date: 2005-10-26 15:34:52
Message-ID: 6627.1130340892@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Stephen Frost <sfrost(at)snowman(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Telin Lin 2005-10-26 15:44:38 Re: BUG #2001: Signal 11 after concurrent inserts + updates
Previous Message Tom Lane 2005-10-26 15:27:55 Re: [BUGS] BUG #1993: Adding/subtracting negative time intervals