Re: pg_dump data and foreign keys

From: Dennis Gearon <gearond(at)cvc(dot)net>
To: John Smith <john_smith_45678(at)yahoo(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: pg_dump data and foreign keys
Date: 2003-03-30 17:02:34
Message-ID: 3E87232A.ACBBC1A6@cvc.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I think there should be an option to pg_dump like so:

1/ Dump tables in any order.
2/ Convert all column constraints to table level constrants, and list
all the previously table level constraints and the newly table level
constraits at the end of the dump.
3/ List all Foreign Key constraints at the end of the dump.
4/ Generate a test of all constraints for each table in a seperte file,
to be run by the DBA should they desire. That way they can see if the
database meets all the constraints.
5/ Also generate a DELETE WHERE file for all constraints that the DBA
can run to clean up the database, with or without using '4' above.

Dennis Gearon wrote:
>
> unfortunately, no. You are best served by dumping the tables manually,
> one a at atime, and concatenating them in the order that they need to
> be.
>
> Of course, making a script do this means you only have to figure this
> out once.
>
> John Smith wrote:
> >
> > Is data dumped from pg_dump -a supposed to be in order so it doesn't
> > cause foreign key conflicts? I'm getting dumps where tables that rely
> > on records in other tables are appearing before them.
> >
> > John
> >
> > ----------------------------------------------------------------------
> > Do you Yahoo!?
> > Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Arjen van der Meijden 2003-03-30 17:34:21 Re: Select aliasses in where and other places of the
Previous Message Georg Steffers 2003-03-30 14:09:25 who can fix RENAME in plpgsql