Re: RI and restoring dumps

From: Matt Beauregard <matt(at)designscape(dot)com(dot)au>
To: "Robert B(dot) Easter" <reaster(at)comptechnews(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: RI and restoring dumps
Date: 2000-12-13 22:45:31
Message-ID: 20001214094531.C30281@designscape.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Dec 13, 2000 at 05:30:49PM -0500, Robert B. Easter wrote:
> On Wednesday 13 December 2000 17:04, Robert B. Easter wrote:
> > Has anyone experienced referential integrity (RI) problems while restoring
> > data from a dump? Like, if the dump doesn't restore the data in the right
> > order, then primary keys might not be in place before the foreign keys are
> > restored. I want to know this from people who have experience before I do
> > use RI!
>
> Ok, I'm replying to my own post here, but I was reading another message
> (above) about a FOREIGN KEY that REFERENCES the same table as it is in. When
> doing a restore of this table, I guess you would have to disable those RI
> checks. I know it can be done (right?), but how? Or is this really
> automatic and not to be worried about!? :)

The triggers by whick FK constraints are implemented are the very last
things in the dumpfile, so the data would be loaded into the database
without any constraint checking. I shouldn't think it possible to
have RI problems with this method of restoration assuming the table
data was consistent when it was dumped.

--
Matt Beauregard
Information Technology Operations, DesignScape

Ph: +61 2 9361 4233 Fx: +61 2 9361 4633

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Robert B. Easter 2000-12-13 23:25:36 Re: RI and restoring dumps
Previous Message Robert B. Easter 2000-12-13 22:30:49 Re: RI and restoring dumps