[postgis-devel] [postgis-users] Allowing use of PostGIS EXTENSION w/out raster

Regina Obe lr at pcorp.us
Mon Oct 9 01:39:22 PDT 2017


> No, but it could be done. Actually, it may make sense to *always* include rtpostgis_upgrade in the unpackaged--current upgrade script, or it could still fail, no ?
Give that a try.  I suspect it might fail.  I don't think unpackaged is supposed to have anything but

ALTERE EXTENSION  ... ADD ...;

Otherwise you are kinda violating the meaning of unpackaged.

> Where as in option (2) you just do this:
> 
> ALTER EXTENSION postgis UPDATE "2.5.0noraster";

> This requires me to know I want "2.5.0", while really all I want is drop raster ? And what happens on next system upgrade ? When postgis_full_version() tells me scripts need to be upgraded ? How do I upgrade them ?

ALTER EXTENSION postgis UPDATE "2.5.1noraster";

I actually always state the version I want since I have multiple postgis installs in my system.  
Like I said you and people like you already know what you are running and what you can upgrade to.

If you happened to forget and just do 
ALTER EXTESNION postgis UPDATE;

The worst that would happen is the raster functions would be reinstalled. No big deal. Just do

ALTER EXTENSION postgis UPDATE "2.5.0noraster";

I'm more worried about folks who do 

ALTER EXTENSION postgis UPDATE;

And forget to do 
ALTER EXTENSION postgis_raster UPDATE; 

And as a result get all sorts of crazy issues.



 > -- would the following get me raster back in ?
 > ALTER EXTENSION postgis UPDATE;

If you have a postgis installed with raster support and you didn't muck with the postgis.control file, then yes you'd get raster support back.

> I'd need to keep checking what version I'm running just to be able to be specific about the flavor of postgis I want to install/upgrade
Don't you do that already?  I'm constantly checking 

SELECT postgis_full_version();

It's going to tell me if I have raster installed or not and if I'm out of synch don't have latest.

There is also 

SELECT * FROM pg_available_extensions WHERE name = 'postgis';

That tells you what version you have installed and what is the default on your system.









More information about the postgis-devel mailing list