Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-bugs by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group