Re: Schema Upgrade Howto

Поиск
Список
Период
Сортировка
От David Fetter
Тема Re: Schema Upgrade Howto
Дата
Msg-id 20081030140245.GP18097@fetter.org
обсуждение исходный текст
Ответ на Re: Schema Upgrade Howto  (Thomas Guettler <hv@tbz-pariv.de>)
Список 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@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com

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

В списке pgsql-general по дате отправления:

Предыдущее
От: "Nikolas Everett"
Дата:
Сообщение: Re: excluding tables from VACUUM ANALYZE
Следующее
От: David Fetter
Дата:
Сообщение: Re: excluding tables from VACUUM ANALYZE