pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jim C. Nasby <jim@nasby.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Paolo Negri <hungrylist@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: pg_dump and foreign keys troubles
Date: Thu, 9 Nov 2006 01:13:26 -0600
Message-ID: <20061109071325.GG90133@nasby.net> (raw)
In-Reply-To: <13513.1162935755@sss.pgh.pa.us>
References: <b242f69c0611070925m55bcd9eai3bc8c059cf389c56@mail.gmail.com>
	<13513.1162935755@sss.pgh.pa.us>

On Tue, Nov 07, 2006 at 04:42:35PM -0500, Tom Lane wrote:
> "Paolo Negri" <hungrylist@gmail.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.

Would a 7.4 or newer pg_dump connecting to a 7.4 database know enough to
do this for you? If so, Paolo could restore his dump to a 7.3 install
and go from there...
-- 
Jim Nasby                                            jim@nasby.net
EnterpriseDB      http://enterprisedb.com      512.569.9461 (cell)



view thread (4+ messages)  latest in thread

Message-ID: <20061109071325.GG90133@nasby.net>
Permalink:  ../20061109071325.GG90133@nasby.net/
Also on:    postgresql.org/message-id/20061109071325.GG90133@nasby.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: jim@nasby.net, tgl@sss.pgh.pa.us, hungrylist@gmail.com
  Subject: Re: pg_dump and foreign keys troubles
  In-Reply-To: <20061109071325.GG90133@nasby.net>
  References: <b242f69c0611070925m55bcd9eai3bc8c059cf389c56@mail.gmail.com> <13513.1162935755@sss.pgh.pa.us> <20061109071325.GG90133@nasby.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox