Re: Dumping/Restoring with constraints? - Mailing list pgsql-general

From Phoenix Kiula
Subject Re: Dumping/Restoring with constraints?
Date
Msg-id e373d31e0808270636q5120e562vd04c959e3fb9b5aa@mail.gmail.com
Whole thread Raw
In response to Re: Dumping/Restoring with constraints?  (Terry Lee Tucker <terry@chosen-ones.org>)
Responses Re: Dumping/Restoring with constraints?
List pgsql-general
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?

pgsql-general by date:

Previous
From: "Merlin Moncure"
Date:
Subject: Re: PITR - base backup question
Next
From: Sam Mason
Date:
Subject: Re: loop vs. aggregate was: update and group by/aggregate