Re: Index name different from constraint name

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Index name different from constraint name
Date: 2005-10-27 14:07:41
Message-ID: 200510271407.j9RE7f829465@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


Added to TODO:

o Have ALTER INDEX update the name of a constraint using that index
o Allow ALTER TABLE RENAME CONSTRAINT

---------------------------------------------------------------------------

Tom Lane wrote:
> 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
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Stephen Frost 2005-10-27 14:11:23 Re: Index name different from constraint name
Previous Message Tom Lane 2005-10-27 13:44:13 Re: Inconsistent description of "postmaster.opts"