Re: AW: Proposal: More flexible backup/restore via pg_dump
Stephan Szabo <sszabo@kick.com>
From: "Stephan Szabo" <sszabo@kick.com>
To: "Philip Warner" <pjw@rhyme.com.au>
Cc: <pgsql-hackers@postgresql.org>
Date: 2000-06-28T19:06:33Z
Lists: pgsql-hackers
> At 08:48 28/06/00 +1000, Giles Lean wrote: > >Otherwise there are "chicken and egg" problems where two tables have > >mutual RI constraints. Even at the tuple level two tuples can be > >mutually dependent. > > Absolutely. And AFAICT, these happen with pg_dump. This will happen for check constraints, but not for foreign key constraints... It actually adds the fk constraints later with CREATE CONSTRAINT TRIGGER after the data dump is finished. And, if you do separate schema and data dumps, the wierd statements at the top and bottom of the data dump turn off triggers and then turn them on again (in the most painful way possible). However those cases do not actually guarantee the validity of the data in between.