[postgis-devel] script to unpackage raster functions from postgis extension

Sandro Santilli strk at kbt.io
Sat Oct 7 09:42:42 PDT 2017


On Sat, Oct 07, 2017 at 12:16:03PM -0400, Regina Obe wrote:

> Look at the helper function drop_if_exists --  https://git.osgeo.org/gogs/postgis/postgis/src/svn-trunk/extensions/postgis_extension_helper.sql#L62

I've ended up adding that create_extension_unpackage.pl script.
It is a filter, spots DROP lines and converts in

  "drop from extension if exist"

With the help of that script the upgrade script now unregisters
all raster functions from the "postgis" extension, so you're left
with an unpackaged raster, which you can hopefully package in
"postgis_raster" right after. You don't get any user message
about that upon ALTER EXTENSION UPDATE, nor postgis_full_version
tells you about it (guess it should).

The run_test.pl script was made aware of this difference and
appropriately does the call to "CREATE EXTENSION postgis_raster
FROM unpackaged" right after upgrading extension from pre-2.5.0
postgis, and it seems to work fine with this call:

  regress/run_test.pl -v \
    --raster \
    --extension \
    --upgrade \
    --upgrade-path 2.4.0--2.5.0dev \
    raster/test/regress/rt_isempty

Who else wants to test ? It is commit e7d495cb4 in my fork
on Gogs (branch split-raster-extension). Drone is testing
upgrades too but is failing becuase trunk is also failing
(Paul can you please fix that regression triggering failures
in topology tests?)

--strk;



More information about the postgis-devel mailing list