From: | "David E(dot) Wheeler" <david(at)kineticode(dot)com> |
---|---|
To: | Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr> |
Cc: | 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-10 22:25:14 |
Message-ID: | CF3E55D7-9924-450C-8F46-0752990217DB@kineticode.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Dec 10, 2010, at 1:50 PM, Dimitri Fontaine wrote:
>> (Actually, we could probably assume that the target version is
>> implicitly "the current version", as identified from the control file,
>> and omit that from the script file names. That would avoid ambiguity
>> if version numbers can have more than one part.)
>
> I don't think we can safely design around one part version numbers here,
> because I'm yet to see that happening in any extension I've had my hands
> on, which means a few already, as you can imagine.
Why not? Simplest thing, to my mind, is to have
upgrade/foo-1.12.sql
upgrade/foo-1.13.sql
upgrade/foo-1.15.sql
Since you know the existing version number, you just run all that come after. For example, if the current version is 1.12, then you know to run foo-1.13.sql and foo-1.15.sql.
> Now, what about having the control file host an 'upgrade' property where
> to put the script name? We would have to support a way for this filename
> to depend on the already installed version, I'm thinking that %v might
> be the easiest here (read: I want to avoid depending on any version
> scheme).
>
> version = '13'
> script = 'foo.sql'
> upgrade = 'foo_upgrade.%v.13.sql'
I think that's way more complicated than necessary.
Best,
David
From | Date | Subject | |
---|---|---|---|
Next Message | Dimitri Fontaine | 2010-12-10 22:32:09 | Re: ALTER EXTENSION ... UPGRADE; |
Previous Message | David E. Wheeler | 2010-12-10 22:22:26 | Re: ALTER EXTENSION ... UPGRADE; |