[postgis-devel] [postgis-tickets] r16847 - Revise postgis_extensions_upgrade to repackage raster if it finds it unpackaged. Revise unpackage notice to say to give instruction to call the postgis_extensions_upgrade function and repackage.

Regina Obe lr at pcorp.us
Mon Oct 1 08:40:36 PDT 2018


> > strk wrote:
> > > If what you don't like is the need to load files from system in
> > > order to uninstall we could provide an uninstall function, do you think it
> would help ?
> >
> > YES - let's do that.
> 
> I'm thinking, if we add this function it'll be installed as part of raster (for
> raster_uninstall(), so people NOT installing raster won't have that function...).
> Generally speaking, such a function would always only work to uninstall the
> version which installed that function in the first places, so good to uninstall
> 3.0.0 unpackaged only...
> 
> --strk;
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-devel
[Regina Obe] 
What a function that drops itself?  Is that legal?

I would think this function would be useless packaged as part of raster.
How about we only install it as a temporary function so would be embedded in CREATE EXTENSION postgis FROM unpackaged
Or ALTER EXTENSION postgis UPDATE;

Instead of the notice run uninstall_rtpostgis, you check if the user has the postgis_raster extension in pg_available_extensions and if not 
Just drop all the raster functions after you have unpackaged from postgis extension.

THE ONLY USE FOR THIS FUNCTION IS TO REMOVE RASTER IF YOU HAVE LOOSE RASTER FUNCTIONS AND don't have the newest rtpostgis lib installed.

That said this function would be totally useless in the raster install scripts, since the only people it would be useful for are people who don't have raster installed.

POST 3.0 NO ONE SHOULD BE USING SCRIPTS to install postgis or postgis_raster.

All people coming from a version that didn't have raster would be instructed to run

CREATE EXTENSION postgis FROM unpackaged;

And everyone else 

ALTER EXTENSION postgis UPDATE;

Thanks,
Regina




More information about the postgis-devel mailing list