Re: How can I compare sql create script with running database?

From: Raymond O'Donnell <rod(at)iol(dot)ie>
To: Bjørn T Johansen <btj(at)havleik(dot)no>
Cc: PostgreSQL general <pgsql-general(at)postgresql(dot)org>
Subject: Re: How can I compare sql create script with running database?
Date: 2008-06-05 10:06:36
Message-ID: 4847BAAC.70603@iol.ie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 05/06/2008 10:52, Bjørn T Johansen wrote:
> If I already have a running database, how can I compare the tables in
> the database with the sql script to discover the differences?

You can use pg_dump with the -s option to dump the schema of the
database, and run it through the diff tool of your choice.

Ray.

------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod(at)iol(dot)ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bjørn T Johansen 2008-06-05 11:44:13 Re: How can I compare sql create script with running database?
Previous Message Bjørn T Johansen 2008-06-05 09:52:26 How can I compare sql create script with running database?