On 27/04/2012 20:40, Alexander Farber wrote:
> So it's not a problem to drop and recreate the FOREIGN KEYs?
No, unless you're doing it on a production system, and someone inserts a
value that'll doesn't agree with the foreign key while it's gone.
Adding the constraint back in may take a while (depending on how big
your table is) as contents of the columns involved need to be checked to
ensure they contain valid values.
Also, I think maybe an exclusive lock is required, which will block out
other users - not sure about this - others on this list will know.
> And can I use START TRANSACTION while doing it?
Yes, absolutely - transactional DDL is one of PG's great strengths.
Ray.
--
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie