Re: ALTER EXTENSION ... UPGRADE;

Aidan Van Dyk <aidan@highrise.ca>

From: Aidan Van Dyk <aidan@highrise.ca>
To: Dimitri Fontaine <dimitri@2ndquadrant.fr>
Cc: "David E. Wheeler" <david@kineticode.com>, Tom Lane <tgl@sss.pgh.pa.us>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2010-12-13T15:18:51Z
Lists: pgsql-hackers
On Mon, Dec 13, 2010 at 9:55 AM, Dimitri Fontaine
<dimitri@2ndquadrant.fr> wrote:

>> 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
>
> Problem is: what to do if a single upgrade matches more than one line?
> The only safe answer is to error out and refuse to upgrade but that
> ain't nice to the user. How much is that a problem here?

To get a wildcard match (or a prefix match) for version upgrades, I'ld
be willing to have that error if I give a bad set of version matches.
If only have those 2 lines to manage, it's a lot more likely I won't
mess them up than if I have to manage 30 almost identical lines and
not miss/duplicate a version.

 ;-)

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