Re: ALTER EXTENSION UPGRADE, v3

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dimitri Fontaine <dimitri@2ndQuadrant.fr>
Cc: "David E. Wheeler" <david@kineticode.com>, Robert Haas <robertmhaas@gmail.com>, Josh Berkus <josh@agliodbs.com>, pgsql-hackers@postgresql.org
Date: 2011-02-11T17:06:28Z
Lists: pgsql-hackers
Dimitri Fontaine <dimitri@2ndQuadrant.fr> writes:
> Tom Lane <tgl@sss.pgh.pa.us> writes:
>> Uh, not sure how you're envisioning that working?  If it fails to find
>> an upgrade script path from the current version to whatever is default,
>> it will still fail to find any path after you explicitly tell it you
>> want to upgrade to that version.

> That's not exactly what happens here.  There would be no "support"
> version alias in the control file, so no way to upgrade to it, and
> "support" would happen to be what ALTER EXTENSION foo UPDATE would
> consider when you don't mention explicitly the target version.

> However, when you do say that you want to upgrade to '2.0' or to
> 'stable', now the upgrade script certainly exists and the version alias
> too, so that the upgrade is possible.  Only explicitly though.

Hmm.  To make that work, we'd have to have ALTER EXTENSION UPDATE use a
different default version name from what CREATE EXTENSION uses (unless
you're willing to also break use of CREATE EXTENSION without an explicit
target version).  I was intending to have "default_version" identify the
default target for both cases.  While we could have different parameters
for the two cases, I think it would mostly just cause confusion.

			regards, tom lane