Em Thursday 01 November 2007 16:57:36 Kynn Jones escreveu:
>
> But it occurred to me that this is a generic enough problem, and that
> I'm probably re-inventing a thoroughly invented wheel. Are there
> standard techniques or resources or Pg capabilities to deal with this
> sort of situation?
You can restore the database without the constraints and then add them back
after you restored the last table.
You can also use pg_dump / pg_restore / psql to do that.
You can also use COPY.
When you want to keep the referential integrity checks in place since the
beginning, you have to respect the order you need to restore your data.
--
Jorge Godoy <jgodoy(at)gmail(dot)com>