A compare and/or sync. database structure?

From: "durumdara(at)gmail(dot)com" <durumdara(at)gmail(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: A compare and/or sync. database structure?
Date: 2009-08-05 08:13:44
Message-ID: op.ux6jservu4w1d6@subdeveloper.chello.hu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi!

I wanna ask that which pg_dump command line needed if I want to compare
two databases?

I have many DBs, but all of them have two versions a development (local)
DB and the online (web) DB.
When I want to realize a new function, I develop it locally, and later I
sync. it into online DB.

But it is hard: I easily miss some things... :-(

Because of that I want to write some tool that can compare databases.
In DBISAM world I can do it easily, because DBISAM tables very-very near
to Delphi DataSets, and I can compare tables/indexes with Delphi
comparations.

In Firebird it was harder, because if must compare tables, and later other
objects (generators) too... :-(

In PostgreSQL I have two way to compare DBs.

1.) pg_dumps, and textdiff.
2.) get schema (table struct, indexes, etc) from all, and compare them.

The first version is need user SQLs, the second can create alter/create
SQLs automatically...

So please help me with your experience: what is the best solution, what is
the possible problem that make mistakes with this plan, and how to realize
it easily?

Thanks for your help:
dd

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Guillaume Lelarge 2009-08-05 08:49:53 Re: A compare and/or sync. database structure?
Previous Message Craig Ringer 2009-08-05 07:44:04 Re: Idle processes chewing up CPU?