Re: how to merge a table from another DB - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: how to merge a table from another DB
Date
Msg-id 20040217192944.GA28099@wolff.to
Whole thread Raw
In response to how to merge a table from another DB  ("Hought, Todd" <Todd.Hought@echostar.com>)
List pgsql-general
On Tue, Feb 17, 2004 at 11:55:55 -0700,
  "Hought, Todd" <Todd.Hought@echostar.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.)

pgsql-general by date:

Previous
From: Mike Nolan
Date:
Subject: Re: how to merge a table from another DB
Next
From: Anton Nikiforov
Date:
Subject: Select statment question