Re: Question - help needed

From: "J(dot) Roeleveld" <joost(at)antarean(dot)org>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Question - help needed
Date: 2010-11-09 17:56:05
Message-ID: 201011091856.05731.joost@antarean.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Tuesday 09 November 2010 18:18:23 Dragan Keselj wrote:
> Hello,
>
> I have 2 identical databases. One is with data and second one is empty (for
> designing).
> Is it possible to make changes on empty database (for example to add,
> remove column or change name...) and, with these changes, refresh design
> of second one database (without data changes)?
>
> thnx for help

Hi,

Simple answer: yes and no...

More usefull answer:
If you make changes to the empty database using "ALTER TABLE" commands, you
should be able to use those same commands on the actual database.

But, if you delete a table/column/... that actually contains data, you WILL
loose that data.

If you redesign using DROP TABLE / CREATE TABLE commands, you will need to find
a tool that can compare 2 states of the database and create the ALTER TABLE
commands for you.

Same goes for other database objects, like VIEWs, INDEXes,....., etc.

--
Joost

PS. I'm not familiar with a free tool that can help with this, but that does
not mean there is no free tool.

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Jayadevan M 2010-11-10 03:31:55 Re: Question - help needed
Previous Message Dragan Keselj 2010-11-09 17:18:23 Question - help needed