On Mar 8, 2006, at 3:01 PM, Tom Lane wrote:
> "Matthew George" <georgema(at)corp(dot)earthlink(dot)net> 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
Jim C. Nasby, Database Architect decibel(at)decibel(dot)org
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?"
In response to
pgsql-bugs by date
|Next:||From: Tom Lane||Date: 2006-03-08 22:37:08|
|Subject: Re: BUG #2308: pg_dump -a does not respect referential dependencies |
|Previous:||From: Tom Lane||Date: 2006-03-08 21:15:45|
|Subject: Re: BUG #2304: Time zone bug: '05:04 GMT+3' processing as '05:04:00 -03' |