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

From Dimitri Fontaine
Subject Re: ALTER EXTENSION UPGRADE, v3
Date
Msg-id m28vxmczi7.fsf@2ndQuadrant.fr
Whole thread Raw
In response to Re: ALTER EXTENSION UPGRADE, v3  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: ALTER EXTENSION UPGRADE, v3  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> writes:
>     CREATE EXTENSION foo [ VERSION targetversion ] [ FROM          oldversion ] 

I came to the same conclusion but added my version aliases idea in 
there so that it could maybe be easy for the user not to confuse 
things.

I still think that free form version aliases and some defaults 
used by the core code is a very interesting feature to have, but I 
can see that it's not required for the feature to fully work.

> 1. If you pick the wrong FROM version, the upgrade script will 
> almost certainly fail, because the objects won't exist or won't 
> be in the state it expects (ie, not already members of the 
> extension). 

Is there a test somewhere that when CREATE OR REPLACE FUNCTION 
runs from an extension's script at upgrade, the function must 
already be attached to the extension if it exists in the system? 
Ditto for views etc?

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


pgsql-hackers by date:

Previous
From: Steve Singer
Date:
Subject: Re: pl/python explicit subtransactions
Next
From: Alex Hunsaker
Date:
Subject: Re: pl/python tracebacks