Re: ALTER EXTENSION UPGRADE, v3

Anssi Kääriäinen <anssi.kaariainen@thl.fi>

From: Anssi Kääriäinen <anssi.kaariainen@thl.fi>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: "David E. Wheeler" <david@kineticode.com>, Dimitri Fontaine <dimitri@2ndQuadrant.fr>, Robert Haas <robertmhaas@gmail.com>, Josh Berkus <josh@agliodbs.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2011-02-11T11:14:38Z
Lists: pgsql-hackers
On 02/11/2011 05:05 AM, Tom Lane wrote:
> Actually, I was having second thoughts about that while at dinner.  What
> is the value of separating the bootstrap-an-extension-from-old-objects
> operation into two steps?  It's certainly not convenient for users, and
> I don't see that the intermediate state with an empty extension has any
> redeeming social value for developers either.  (If you need such a thing,
> just make an empty creation script.)
>
> So: let's forget the concept of a special "null version" altogether, at
> least from the user's-eye viewpoint.  Instead, the way to bootstrap from
> loose objects is something like
>
> 	CREATE EXTENSION foo [ VERSION '1.0' ] [ FROM OLD ]
The above command assumes there is only one unpackaged version from 
which users might update from. Is that what is wanted? I am wondering if 
FROM OLD should be FROM OLD VERSION version (or better: FROM UNPACKAGED 
VERSION version). This would also solve how to name the old version(s). 
Author decides.

  - Anssi