On 2010-07-12, at 06:43 , Brad Nicholson wrote: > (assuming Y and Z are the only columns, if there are others, include > them accordingly) > > CREATE TABLE XXX_new LIKE XXX (exclude the indexes) > INSERT INTO XXX_new (Y,Z) SELECT Y,Z where Z <> 1; > INSERT INTO XXX_new (Y,Z) SELECT 'Y',Z where Z = 1; > > ALTER TABLE XXX RENAME XXX_old; > ALTER TABLE XXX_new RENAME XXX; > > Then add the indexes back on (rename the indexes on XXX_old first if you > want to maintain the index names). >
Do I need to run this in an EXECUTE SCRIPT? Or directly on the DB? While Slony is running? _______________________________________________ Slony1-general mailing list [email protected] http://lists.slony.info/mailman/listinfo/slony1-general
