Re: how do I do dump and restore without bugging with constraint?

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: "Net Tree Inc(dot)" <nettreeinc(at)gmail(dot)com>
Cc: John R Pierce <pierce(at)hogranch(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: how do I do dump and restore without bugging with constraint?
Date: 2010-02-23 07:31:29
Message-ID: dcc563d11002222331x74b5ac69nee84096585dad13a@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

On Mon, Feb 22, 2010 at 11:39 PM, Net Tree Inc. <nettreeinc(at)gmail(dot)com> wrote:
> Ok, I am just trying to find the proper way to back and restore database
> that contain restriction.
> The other way to ask. If I have two 99% schema similar databases. The old
> one might contain few columns that does not exist in the new one and contain
> constrains that the new DB does not have. In that case, what's standard to
> do this?
> Since they are 99% similar in schema, can I do "data dump" only ? will that
> work?
> If owner for database between Old and new DB are different, do I must add
> that owner in by create new role?
> appreciated,

What I would do is to dump and restore the db as a whole which will
take care of constraint issues. Then I would alter the tables to
match the new schema.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Net Tree Inc. 2010-02-23 09:17:30 Re: how do I do dump and restore without bugging with constraint?
Previous Message Net Tree Inc. 2010-02-23 06:39:44 Re: how do I do dump and restore without bugging with constraint?

Browse pgsql-general by date

  From Date Subject
Next Message Wang, Mary Y 2010-02-23 07:32:03 Re: How to Output PSQL Errors to a Log File?
Previous Message Nilesh Govindarajan 2010-02-23 07:29:54 Re: How to Output PSQL Errors to a Log File?