Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Generating a dump file

Status
Not open for further replies.

eheidrich

Programmer
Feb 2, 2005
7
BR
Well, I've having many issues with dump files which I've been able to solve with some help I got from here. Now my problem is to generate a dump file that folow the hierarchy of the constraints.
The situation is that I have a script that generates the database and its constraints. The dump file is supposed to have only the data, but it seems to come out of order. Some foreign keys are being set without the father table being populated, generating errors.
The file works fine if I set the table constraints after populating the database, but the thing is I have to make it work "hard way".

I thank everybody for all the atention that have been given me and I hope I'll be able to help others.
 
I think your solution is this: dump only the schema and then dump the data only.

pg_dump -s
then
pg_dump -a

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top