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 16:30:04
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
Stephen Frost <sfrost(at)snowman(dot)net> writes:
> * Tom Lane (tgl(at)sss(dot)pgh(dot)pa(dot)us) wrote:
>> 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).

> That would work too, though I don't think you can just rename a
> constraint.

Yeah, we'd need to add syntax for that, but it seems useful anyway.

Plan B would be to make the ALTER INDEX RENAME update the associated
constraint too, but that doesn't give you a facility to rename
constraints of other types.

Anyway, point is that I think we should force the index and constraint
names to track each other, rather than complicating matters by
supporting the situation where they are different.

			regards, tom lane

In response to


pgsql-bugs by date

Next:From: Andrew - SupernewsDate: 2005-10-26 19:10:43
Subject: Re: BUG #1993: Adding/subtracting negative time intervals
Previous:From: Stephen FrostDate: 2005-10-26 16:14:57
Subject: Re: Index name different from constraint name

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