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

From David E. Wheeler
Subject Re: ALTER EXTENSION ... UPGRADE;
Date
Msg-id 0BA974D9-3CB7-41D6-AE80-DB40A7659AD6@kineticode.com
Whole thread Raw
In response to Re: ALTER EXTENSION ... UPGRADE;  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
Responses Re: ALTER EXTENSION ... UPGRADE;  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Dec 10, 2010, at 2:55 PM, Dimitri Fontaine wrote:

> Tom Lane <tgl@sss.pgh.pa.us> writes:
>> If we assume the target is the current version, then we only need the
>> old-version number in the file name, so it doesn't matter how many
>> parts it has.
>
> IIUC, that puts even more work on the shoulders of the extension
> authors, because the file named foo-1.12.sql is the one used to upgrade
> from 1.12. That means that at each release, it's a different file
> content, it's there to upgrade to a newer release.

Yeah, it should be *to* 1.12. FWIW, this is how Bricolage upgrade scripts are handled: version-string-named directories
withthe appropriate scripts to upgrade *to* the named version number. 

> So, we have a sound proposal for the ALTER EXTENSION UPGRADE command,
> which comes later. So we keep version numbers in the CREATE EXTENSION
> patch and the control files, and remove the facility to get this number
> from the Makefile. Is that right?

Yes. No new variables in Makefile at all IIUC.

Best,

David



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: ALTER EXTENSION ... UPGRADE;
Next
From: "David E. Wheeler"
Date:
Subject: Re: ALTER EXTENSION ... UPGRADE;