[postgis-devel] EXTENSION upgrade scripts are now symlinks

Sandro Santilli strk at kbt.io
Sat Oct 7 02:38:36 PDT 2017

On Fri, Oct 06, 2017 at 04:35:45PM -0400, Regina Obe wrote:

> I'm sure other extension developers are similarly frustrated with the
> plethora of scripts.  So it would be more useful to implement an idea of
> What I'll call "Virtual Scripts"  which would essentially be a separate
> file with regex or something that define
> postgis-2.**--postgis-2.5.0.sql  ->  postgis-ANY—2.5.0.sql
> That would give us the freedom of defining extra scripts for special
> versions or just have single as we do now.

+1 - so the code should give precedence to non-patterned paths and
only use patterned when nothing else is available.

> And you can't really use something like a function  SELECT
> postgis_upgrade()   if it has to interact with the file system to pull
> in a script file.

You don't need to interact with file system if you:

 - Set extension version to "<version>next" (messes with catalog)
 - Run ALTER EXTENSION ... VERSION '<version>'

Or (w/out messing with catalogs):

 - Unregister all extension functions
 - Drop extension
 - Create extension from unpackaged


More information about the postgis-devel mailing list