Re: rename index?

From: Brent Verner <brent(at)rcfile(dot)org>
To: mlw <markw(at)mohawksoft(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: rename index?
Date: 2001-11-12 19:32:19
Message-ID: 20011112143219.B2029@rcfile.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 12 Nov 2001 at 13:35 (-0500), mlw wrote:
| Tom Lane wrote:
| >
| > ALTER TABLE RENAME works on indexes (at least in recent releases).
| >
| > regards, tom lane
|
| Hmm, how does that work? Is there a naming convention which I must follow for
| this to work? (I am using 7.2B2 to devlope this system).

ALTER TABLE /will/ keep the index on the table, but the index will
retain its original name, i.e., idx_fubar_tmp_id, even after the
table is renamed, so doing your create/copy/rename/drop sequence will
not work the second time, since the temp index already exists (by name).

This seems like a useful feature to have. Is there anything like
this in SQL99?

cheers.
brent-'who doesn''t have SQL99 docs'

--
"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

Browse pgsql-hackers by date

  From Date Subject
Next Message Ilker Egilmez 2001-11-12 20:06:16 problem: index on number not honoured
Previous Message Kevin Jacobs 2001-11-12 19:19:24 Re: Possible major bug in PlPython (plus some other ideas)