Re: How to use PG_DUMP?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andre Lopes <lopes80andre(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How to use PG_DUMP?
Date: 2010-01-24 17:22:25
Message-ID: 27708.1264353745@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Andre Lopes <lopes80andre(at)gmail(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gauthier, Dave 2010-01-24 18:47:20 Re: Recursion in triggers?
Previous Message Tom Lane 2010-01-24 17:14:59 Re: [HACKERS] Sugerencia de opcion