Re: ALTER EXTENSION ... UPGRADE; - Mailing list pgsql-hackers

From Tom Lane
Subject Re: ALTER EXTENSION ... UPGRADE;
Date
Msg-id 8174.1292255443@sss.pgh.pa.us
Whole thread Raw
In response to Re: ALTER EXTENSION ... UPGRADE;  (Aidan Van Dyk <aidan@highrise.ca>)
Responses Re: ALTER EXTENSION ... UPGRADE;  (Alvaro Herrera <alvherre@commandprompt.com>)
Re: ALTER EXTENSION ... UPGRADE;  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
List pgsql-hackers
Aidan Van Dyk <aidan@highrise.ca> writes:
> On Sat, Dec 11, 2010 at 4:35 PM, David E. Wheeler <david@kineticode.com> wrote:
>> Why not just use an upgrade script naming convention?

> Mainly, because of the situation where I have may versions that can
> all be upgraded from the same script.  I'ld much rather distribution
> just 3 scripts (install + 2 upgrades), and a control file with
> something like this (pretend I'm on version 2.6)
>     upgragde-1.0 = $EXT-upgrade-1.sql
>     upgragde-1.1 = $EXT-upgrade-1.sql
>     upgragde-1.1.1 = $EXT-upgrade-1.sql
>     upgragde-1.1.2 = $EXT-upgrade-1.sql
>     upgragde-1.2 = $EXT-upgrade-1.sql
>     upgragde-1.3 = $EXT-upgrade-1.sql
>     upgragde-1.4 = $EXT-upgrade-1.sql
>     upgragde-1.4.1 = $EXT-upgrade-1.sql
>     upgrade-2.0 = $EXT-upgrade-2.sql
>     upgrade-2.1 = $EXT-upgrade-2.sql
>     upgrade-2.2 = $EXT-upgrade-2.sql
>     upgrade-2.2.1 = $EXT-upgrade-2.sql
>     upgrade-2.3 = $EXT-upgrade-2.sql
>     upgrade-2.4 = $EXT-upgrade-2.sql
>     upgrade-2.5 = $EXT-upgrade-2.sql

I see no advantage of this over a script per version combination, so
long as you allow scripts to \include each other.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: ALTER TABLE ... ADD FOREIGN KEY ... NOT ENFORCED
Next
From: Alvaro Herrera
Date:
Subject: Re: initdb failure with Postgres 8.4.4