Re: [SQL] Postgres schema comparison.

From: Stef <svb(at)ucs(dot)co(dot)za>
To: jim(at)contactbda(dot)com
Cc: pgsql-sql(at)postgresql(dot)org, pgsql-admin(at)postgresql(dot)org
Subject: Re: [SQL] Postgres schema comparison.
Date: 2005-03-08 08:00:00
Message-ID: 20050308100000.64674fec@svb.ucs.co.za
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-sql

Jim Buttafuoco mentioned :
=> 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.

Thanks!

This is something I haven't even thought of.
Only some of the machines have dblink installed at the moment,
but that's the same work as having to install pgcrypto everywhere.

This is actually more thorough. It seems to be working with some minor changes on 7.3
(The dblink functions don't allow multiple connections, and take only one argument, so
I created temp tables in stead). This is actually very fast.

Thanks again.

Kind Regards
Stefan

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Matteo Beccati 2005-03-08 08:59:20 Re: Postgres schema comparison.
Previous Message Afton & Ray Still 2005-03-08 07:07:11 Re: [ADMIN] PostgreSQL installation problem on Windows XP Home

Browse pgsql-sql by date

  From Date Subject
Next Message Sim Zacks 2005-03-08 08:09:24 Re: group by before and after date
Previous Message Sim Zacks 2005-03-08 07:29:37 group by before and after date