On Mar 8, 2006, at 3:01 PM, Tom Lane wrote:

"Matthew George" <[EMAIL PROTECTED]> writes:
The best practice is to do standard schema+data dumps, wherein the
ordering problem can be handled properly by not creating the FK
constraints until after the data is loaded.  If you really want to
do a data-only restore, I'd suggest dropping the FK constraints
and re-adding them afterwards (which will be a lot faster than
row-by-row retail checks would be, anyway).

BTW, it would be really nice if we provided a better way to do this than manually dropping all the FK constraints and adding them back in later. Would it be difficult to allow deferring all constraints in the database during a specified transaction? That would allow for loading the data in a transaction and doing the constraint checking later...
--
Jim C. Nasby, Database Architect                [EMAIL PROTECTED]
Give your computer some brain candy! www.distributed.net Team #1828

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"



---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to