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 <[EMAIL PROTECTED]>
To: Tom Lane <[EMAIL PROTECTED]>
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 [EMAIL PROTECTED] so that your
>       message can get through to the mailing list cleanly
------- End of Original Message -------

Attachment: db_compare.sql
Description: Binary data

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to