Re: ALTER EXTENSION ... UPGRADE;

From: Aidan Van Dyk <aidan(at)highrise(dot)ca>
To: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
Cc: Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER EXTENSION ... UPGRADE;
Date: 2010-12-13 14:42:43
Message-ID: AANLkTikRGJS8MiZ81aEF+Pokt4jkjA9D=cKYWpDdt5Xp@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Dec 11, 2010 at 4:35 PM, David E. Wheeler <david(at)kineticode(dot)com> wrote:

>> What about having the following keys supported in the control file:
>>
>>  upgrade_<version> = 'script.version.sql'
>>  upgrade_all = 'script.sql'
>
> Why not just use an upgrade script naming convention? Think: Convention over configuration.

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

Forcing convention on me to maitain/install an upgrade script for
every single version is way more than asking me to just specify an
upgrade script for versions.

Again, I'ld love for the "version" to support some sort of prefix or
wildcard matching, so I could do:
upgrade-1.* = $EXT-upgrade-1.sql
upgrade-2.* = $EXT-upgrade-2.sql

a.

--
Aidan Van Dyk                                             Create like a god,
aidan(at)highrise(dot)ca                                       command like a king,
http://www.highrise.ca/                                   work like a slave.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexey Klyukin 2010-12-13 14:42:51 Re: Optimize PL/Perl function argument passing [PATCH]
Previous Message Dimitri Fontaine 2010-12-13 14:36:12 Re: pg_execute_from_file, patch v10