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