Sumbry][ wrote:

Thomas Mueller wrote:
Hi Sumbry][,

[..] It looks like even with
the table prefixes, if you ran a pre RC8 version then you'll have
table names with prefixes, but index names, sequences, etc with the
old style of naming.  And of course in Postgres, there is no RENAME
INDEX or RENAME SEQUENCE command.
Of course there is - hidden but it's there:

alter table oldindex rename to newindex;
alter table oldsequence rename to newsequence;

I still have to migrate to tablenames with prefixes, I'll post the
script when it's done.

Argh!!!!  Why isn't this documented?!?  Hah, I never had to rename
indexes before so never needed this functionality, but poured through
the docs nonetheless trying to find if it was there.  I think I even
stumbled across code in the sources to actually do it, but figured it
wasn't commited yet.

This sucks - wasted more time than necessary writing that script then
but at least I know for the future. Thanks!
The PostgreSQL 1.2 -> 2.0 migration script now also renames the primary keys.

Ilja

--
Ilja Booij
IC&S B.V.

Stadhouderslaan 57
3583 JD  Utrecht
www.ic-s.nl

T algemeen: 030 6355730
T direct: 030 6355739
F: 030 6355731
E: [EMAIL PROTECTED]

Reply via email to