Re: db schema diff

From: Jeremiah Jahn <jeremiah(at)cs(dot)earlham(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: postgres list <pgsql-general(at)postgresql(dot)org>
Subject: Re: db schema diff
Date: 2004-04-14 14:04:25
Message-ID: 1081951465.22054.24.camel@bluejay.goodinassociates.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Although now consistent, is there a way to strip out the comments? since
they differ between dbs? Right now, I use grep, but I have this need to
live in a perfect world were everything is just a command line
option..:)

On Mon, 2004-04-12 at 16:57, Tom Lane wrote:
> Igor Shevchenko <igor(at)carcass(dot)ath(dot)cx> writes:
> > On Monday 12 April 2004 22:38, you wrote:
> >> ${PG_DUMP} -s -p 5432 mydb|${GREP} -v '^--'|${CAT} -s >5432.sql
> >> ${PG_DUMP} -s -p 5433 mydb|${GREP} -v '^--'|${CAT} -s >5433.sql
> >> ${PG_DUMP} -s -p 5434 mydb|${GREP} -v '^--'|${CAT} -s >5434.sql
> >>
> >> ${DIFF} 5432.sql 5433.sql > 5432-5433.diff
> >> ${DIFF} 5433.sql 5434.sql > 5433-5434.diff
>
> > I used to do exactly this but the pg_dump order is different on my two
> > servers, and this generates lots of false diffs.
>
> FWIW, CVS tip pg_dump has been modified to produce a consistent (and
> safe) dump order, so its output should be a lot more useful for schema
> diff'ing purposes than previous releases were.
>
> It should work to build a current snapshot and use its pg_dump against
> older servers, if you need a solution now.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
--
Jeremiah Jahn <jeremiah(at)cs(dot)earlham(dot)edu>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Shachar Shemesh 2004-04-14 14:33:22 Stored procedures output variables
Previous Message Juris Krumins 2004-04-14 14:02:55 Re: cache lookup of relation 165058647 failed