Skip site navigation (1) Skip section navigation (2)

Re: SQL-Dump and refertial Integrity

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Thomas Woehlke <Thomas(dot)Woehlke(at)ESC-Electronics(dot)de>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: SQL-Dump and refertial Integrity
Date: 2002-04-15 17:44:23
Message-ID: 24644.1018892663@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-novice
Thomas Woehlke <Thomas(dot)Woehlke(at)ESC-Electronics(dot)de> writes:
> If I export the Structure via pg_dump 
> the table are dumped in alphabetical order, but the order violates
> the refenrential integrity of my db. 

> At inserting it via psql db < db_structure.sql it throws errors and the
> database is not not correctly build on the other server. Tables are
> missing.

How old is your PG version?  This problem was fixed ages ago.

If you cannot find any other way out, you'll have to edit the dump file
by hand to put the table declarations in a valid order.  (It might be
best to dump schema and data separately, if the combined dump file is
too large to edit conveniently.)

			regards, tom lane

In response to

pgsql-novice by date

Next:From: Stephan SzaboDate: 2002-04-15 17:45:09
Subject: Re: data order problem
Previous:From: Josh BerkusDate: 2002-04-15 15:51:43
Subject: Re: Date format

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group