Re: ALTER RENAME and indexes

From: Brent Verner <brent(at)rcfile(dot)org>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER RENAME and indexes
Date: 2001-10-06 23:49:32
Message-ID: 20011006194932.A13304@rcfile.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 05 Oct 2001 at 10:18 (-0400), Brent Verner wrote:
| On 05 Oct 2001 at 09:46 (-0400), Tom Lane wrote:
| | Brent Verner <brent(at)rcfile(dot)org> writes:
| | > 'ALTER TABLE tbl RENAME col1 TO col2' does not update any indices that
| | > reference the old column name.
| |
| | It doesn't need to; the indexes link to column numbers, not column
| | names.

ah, I think I see the problem... The pg_attribute.attname just needs
updating, right? I suspect this after noticing that the
pg_get_indexdef(Oid) function produced the correct(expected) results,
while those using pg_attribute were wrong.

If this is the _wrong_ answer for this, stop me before I make a
big mess :-)

working...
b

--
"Develop your talent, man, and leave the world something. Records are
really gifts from people. To think that an artist would love you enough
to share his music with anyone is a beautiful thing." -- Duane Allman

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Larry Rosenman 2001-10-06 23:53:29 Re: anoncvs and CVS link off developers.postgresql.org
Previous Message Tom Lane 2001-10-06 23:25:47 Re: Patch for fixing a few memory leaks