Re: How to use PG_DUMP? - Mailing list pgsql-general

From Tom Lane
Subject Re: How to use PG_DUMP?
Date
Msg-id 27708.1264353745@sss.pgh.pa.us
Whole thread Raw
In response to How to use PG_DUMP?  (Andre Lopes <lopes80andre@gmail.com>)
Responses Re: How to use PG_DUMP?
List pgsql-general
Andre Lopes <lopes80andre@gmail.com> writes:
> I have generated the CREATE statements using a modeling tool, and I have
> created another database to test the changes. My problem is the order of the
> INSERT statements generated by PG_DUMP [-a -d], causing errors because of
> the order of the INSERTS.

If you are talking about foreign key constraint failures, the best way
is to use a regular dump (not -a).  pg_dump will order the data and
constraint creations properly then.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Sugerencia de opcion
Next
From: "Gauthier, Dave"
Date:
Subject: Re: Recursion in triggers?