Re: pg_dump and foreign keys troubles

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Paolo Negri" <hungrylist(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: pg_dump and foreign keys troubles
Date: 2006-11-07 21:42:35
Message-ID: 13513.1162935755@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

"Paolo Negri" <hungrylist(at)gmail(dot)com> writes:
> My problem is that I have to load the dump (from a 7.3) in a brand new
> database (8.1) and then I need to do quite a few changes to the schema
> dropping some old foreign constraint and adding some different ones.
> ...
> How can I tell to pg_dump to dump the schema with foreign keys
> construct instead of creating constraint trigger?

You can't: the information just isn't there in 7.3. You'll need to look
at the trigger arguments and reconstruct the FKs.

IIRC the contrib/adddepend script might be able to help you with this.

regards, tom lane

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Steve Holdoway 2006-11-07 22:32:46 validating incoming string length...
Previous Message Mark Steben 2006-11-07 20:50:25 Re: Question