On Fri, Nov 27, 2009 at 9:53 PM, Aaron Bentley <[email protected]> wrote:
> "I'm finding it is much better to drop and recreate tables than rename > them - it causes problems with index names and constraints keeping old > names and even triggered a Slony-I bug once where it was making naming > assumptions that could be broken by renaming tables." > > https://code.edge.launchpad.net/~abentley/launchpad/messagejob/+merge/3610 > > What did I misunderstand? Nothing really. You rename the table, rebuild all the constraints so they have the right names, rename the sequences - lots of ALTER TABLE statements and it can be simpler and sometimes quicker to just recreate the table from scratch. The Slony-I issue means you can't do it half way (rename the table but not bother with renaming the primary key sequence if I recall correctly). -- Stuart Bishop <[email protected]> http://www.stuartbishop.net/ _______________________________________________ Mailing list: https://launchpad.net/~launchpad-dev Post to : [email protected] Unsubscribe : https://launchpad.net/~launchpad-dev More help : https://help.launchpad.net/ListHelp

