pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Phoenix Kiula <phoenix.kiula@gmail.com>
To: Terry Lee Tucker <terry@chosen-ones.org>
Cc: PG-General Mailing List <pgsql-general@postgresql.org>
Subject: Re: Dumping/Restoring with constraints?
Date: Wed, 27 Aug 2008 21:36:35 +0800
Message-ID: <e373d31e0808270636q5120e562vd04c959e3fb9b5aa@mail.gmail.com> (raw)
In-Reply-To: <200808270929.42049.terry@chosen-ones.org>
References: <e373d31e0808270619uba31c8eodc2c85662b85140a@mail.gmail.com>
	<200808270929.42049.terry@chosen-ones.org>

On Wed, Aug 27, 2008 at 9:29 PM, Terry Lee Tucker <terry@chosen-ones.org> wrote:

> We have all sorts of constraints and foreign keys and we have never had any
> problem with pg_restore related to dumping such that foreign keys are
> satisfied. You must have data already in the database that violates the
> restraints. You can restore in two phases; that is, by restoring the schema,
> and then the data using --disable-triggers. I'm assuming you are doing a
> binary dump. See the man page for pg_restore.



Thanks for this. I don't have any foreign key violations in my
existing database. I think the violation is happening because upon
restoring the table that is being populated checks in another table
that doesn't yet have data.

I am not using pg_restore. I am just using "psql --file=FILENAME"
syntax. Is that an issue?



view thread (36+ messages)  latest in thread

Message-ID: <e373d31e0808270636q5120e562vd04c959e3fb9b5aa@mail.gmail.com>
Permalink:  ../e373d31e0808270636q5120e562vd04c959e3fb9b5aa@mail.gmail.com/
Also on:    postgresql.org/message-id/e373d31e0808270636q5120e562vd04c959e3fb9b5aa@mail.gmail.com

 · 

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: phoenix.kiula@gmail.com, terry@chosen-ones.org, pgsql-general@postgresql.org
  Subject: Re: Dumping/Restoring with constraints?
  In-Reply-To: <e373d31e0808270636q5120e562vd04c959e3fb9b5aa@mail.gmail.com>
  References: <e373d31e0808270619uba31c8eodc2c85662b85140a@mail.gmail.com> <200808270929.42049.terry@chosen-ones.org> <e373d31e0808270636q5120e562vd04c959e3fb9b5aa@mail.gmail.com>

* 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