Re: ALTER EXTENSION UPGRADE, v3 - Mailing list pgsql-hackers

From Dimitri Fontaine
Subject Re: ALTER EXTENSION UPGRADE, v3
Date
Msg-id m2wrlh55ze.fsf@2ndQuadrant.fr
Whole thread Raw
In response to Re: ALTER EXTENSION UPGRADE, v3  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> writes:
> Now having said that, it does occur to me that there is an upgrade-ish
> scenario that every user is going to hit immediately, which is how to
> get from an existing installation with a pile of "loose" objects created
> by one or more contrib modules to a state where those objects are
> understood to be parts of modules.  But that is a special case that
> perhaps deserves a special-case solution, rather than inventing a very
> large wheel.

Well a good deal of the code I've written in the UGPRADE patch is there
for this special case, that's ALTER OBJECT ... SET EXTENSION ...;

This allows to "attach" any existing object to a given existing
extension.  Now what you need is a way to create an empty extension so
that you can attach objects to it.  That's in the patch in the form of
the new command CREATE WRAPPER EXTENSION ...;
 WRAPPER was the most convenient keyword we already have I found.

Then, there's only 2 things left in the patch.  The contrib scripts that
make that happen, and the control file support so that the command ALTER
EXTENSION $contrib UPGRADE will run the upgrade script.

This mechanism has been made in a way that allows it to cover running
other scripts for other kind of upgrades.  That's about it.

Regards,
-- 
Dimitri Fontaine
http://2ndQuadrant.fr     PostgreSQL : Expertise, Formation et Support


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: arrays as pl/perl input arguments [PATCH]
Next
From: Tom Lane
Date:
Subject: Re: is_absolute_path incorrect on Windows