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

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

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,

Steven

On Tue, Feb 23, 2010 at 1:09 PM, John R Pierce <pierce(at)hogranch(dot)com> wrote:

> Net Tree Inc. wrote:
>
>> Hi all,
>>
>> I am dumping both schema and data from old database to new one. The new
>> database schema is somehow contain slightly different schema then the old
>> one. When I do restore it shown alot errors related with constraints. How
>> can I dump and to restore from old to new without dealing with constraint
>> and just forces data dump to where it suppose to belong?
>>
>>
>>
>>
>
> if you're dumping the schema and the data, you should be restoring into an
> empty database, not into an existing database.
>
>
>

--
---------------------------------------
Steven Huang

In response to

Responses

Browse pgsql-admin by date

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

Browse pgsql-general by date

  From Date Subject
Next Message Net Tree Inc. 2010-02-23 06:39:44 Re: how do I do dump and restore without bugging with constraint?
Previous Message Tom Lane 2010-02-23 06:09:24 Re: Sorting performance vs. MySQL