Re: how to merge a table from another DB

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: "Hought, Todd" <Todd(dot)Hought(at)echostar(dot)com>
Cc: postgres <pgsql-general(at)postgresql(dot)org>
Subject: Re: how to merge a table from another DB
Date: 2004-02-17 19:29:44
Message-ID: 20040217192944.GA28099@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Feb 17, 2004 at 11:55:55 -0700,
"Hought, Todd" <Todd(dot)Hought(at)echostar(dot)com> wrote:
> I have a bit of a dilemma, I'm fairly new to PG, and not quite sure how
> to do this:
> I have a DB that has been basically 'forked' - a copy of the original
> was made for a handful of users to play with without messing with the
> live DB. Now, they would like to know if the changes they have made to
> the forked db can be merged back in to the live one. A change to one
> column of every row in a certain table. How can I update just that field
> in every row of the db without harming the existing data already in that
> table?

To change the data in a column you can just use an update command.
Alter table can be used to change constraints or to change the column
tpye. (The latter is usually done by adding a new column, converting
the old values, dropping the old column, renaming the new column
back to the original name, and then fixing any constraints.)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruno Wolff III 2004-02-17 19:32:46 Re: String manipulation
Previous Message Ashish Mahabal 2004-02-17 19:15:13 Re: postgresql system column errors