Re: [ADMIN] Postgres schema comparison. - Mailing list pgsql-sql

From Jim Buttafuoco
Subject Re: [ADMIN] Postgres schema comparison.
Date
Msg-id 20050307160942.M57950@contactbda.com
Whole thread Raw
In response to Re: [ADMIN] Postgres schema comparison.  (Stef <svb@ucs.co.za>)
Responses Re: [ADMIN] Postgres schema comparison.  (Stef <svb@ucs.co.za>)
List pgsql-sql
Stef,

I use dblink to attach to both databases and query pg_namespace, pg_class, pg_attribute ... to get the diffs.  See
attached as an example.  look for the dblink_connect lines to specify your database.  You will need to install
contrib/dblink.  I used this with 7.4.X series and have NOT tested yet with 8.0.X.

You can adjust the output to fit your needs.

Jim


---------- Original Message -----------
From: Stef <svb@ucs.co.za>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-ADMIN@postgresql.org, pgsql-sql@postgresql.org
Sent: Mon, 7 Mar 2005 17:31:55 +0200
Subject: Re: [ADMIN] [SQL] Postgres schema comparison.

> Tom Lane mentioned :
> => > The problem I have with this, is that I have to run the command per table,
> =>
> => Why?
> =>
> => If the problem is varying order of table declarations, try 8.0's
> => pg_dump.
>
> Yes, this will solve the global schema check, but I will still need to split
> it into "per table" dumps , to do "per table" comparisons.
>
> Kind Regards
> Stefan
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
>       subscribe-nomail command to majordomo@postgresql.org so that your
>       message can get through to the mailing list cleanly
------- End of Original Message -------


Attachment

pgsql-sql by date:

Previous
From: Stef
Date:
Subject: Re: [SOLVED] Postgres schema comparison.
Next
From: Bruno Wolff III
Date:
Subject: Re: Links between rows in a table