Postgres schema comparison.

From: Stef <svb(at)ucs(dot)co(dot)za>
To: pgsql-ADMIN(at)postgresql(dot)org
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Postgres schema comparison.
Date: 2005-03-07 09:33:12
Message-ID: 20050307113312.2200b65c@svb.ucs.co.za
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-sql

Hi all,

I've got a master database with many other databases that
all have (or is supposed to have) the same exact same schema
as the master database (the master database is basically an empty
template database containing the schema definition).

The problem is that none of the schemas actually match the master schema.
e.g. missing columns, columns not in the correct order (attnum), missing indexes
and primary keys, and in severe cases, missing sequences and tables.

I have the wonderful job of re-synch'ing all the schemas out there not
conforming to the master. I've looked everywhere for something that
will help doing this. I'm specifically looking for a way to do a sumcheck
or something similar on tables and/or schema as a whole to be able to
do a table comparison with the master database.

It will be a bonus to pick up exactly what is missing, but for now, just identifying
differences is what I want to achieve. I'm using postgres 7.3 mostly, but
I may want to use this for 7.4 and 8.0 databases as well.

Has anybody got some suggestions of what I can do or use to do this.

TIA
Kind Regards
Stefan

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Radtchenko Igor 2005-03-07 10:21:47 Re: Build from file syntax troublem (part II).
Previous Message Miroslav Šulc 2005-03-07 07:16:22 Re: how to install pg 8 in windows fat32 partition

Browse pgsql-sql by date

  From Date Subject
Next Message Markus Schaber 2005-03-07 12:01:59 Re: [SQL] Postgres schema comparison.
Previous Message Mauro Bertoli 2005-03-07 08:29:43 Re: Postgres performance