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: (view raw, whole thread or download thread mbox)
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"
> test=> alter table a rename to c;
> test=> alter index a_pkey rename to c_pkey;

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


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-2017 The PostgreSQL Global Development Group