Re: Schema Upgrade Howto

From: David Fetter <david(at)fetter(dot)org>
To: Thomas Guettler <hv(at)tbz-pariv(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Schema Upgrade Howto
Date: 2008-10-30 14:02:45
Message-ID: 20081030140245.GP18097@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Oct 30, 2008 at 02:37:43PM +0100, Thomas Guettler wrote:
> Hi,
>
> I found a way to do it.

It's the wrong way. Trust me on this.

> One problem remains: The order of the columns can't be changed. Any
> change to make postgres support this in the future?

It's been proposed several times :)

> My way:
>
> pg_dump -s prod | strip-schema-dump.py - > prod.schema
> pg_dump -s devel | strip-schema-dump.py - > devel.schema
>
> strip-schema-dump.py removes some stuff which I don't care about (Owner, Comments, ...)
>
> kdiff3 prod.schema devel.schema
>
> You need to create an upgrade script by looking at the diff.

No. Really, no. You need to create the upgrade script by creating
upgrade scripts, not by reverse engineering.

Cheers,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David Fetter 2008-10-30 14:04:17 Re: excluding tables from VACUUM ANALYZE
Previous Message Nikolas Everett 2008-10-30 13:40:59 Re: excluding tables from VACUUM ANALYZE