I would like to be able to truncate all of the tables in a schema without worrying about FK constraints. I tried
issuinga "SET CONSTRAINTS ALL DEFERRED" before truncating, but I still get constraint errors. Is there a way to do
somethinglike:
1) disable all constraints
2) truncate all tables
3) re-enable all constraints
?
In the slony project there is a procedure "altertableforreplication" that appears to do 1), but since it is updating
pg_catalogtables directly, I don't want to cut/paste before I understand what it's doing!
Is there any "standard" way of doing this?
- DAP
----------------------------------------------------------------------------------
David Parker Tazz Networks (401) 709-5130