Re: Populating large DB from Perl script

From: Jorge Godoy <jgodoy(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Populating large DB from Perl script
Date: 2007-11-01 22:06:51
Message-ID: 200711012006.52396.jgodoy@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Gregory Stark 2007-11-01 22:11:24 Re: select random order by random
Previous Message Tom Lane 2007-11-01 21:28:15 Re: (Never?) Kill Postmaster?