[postgis-users] [postgis-devel] Allowing use of PostGIS EXTENSION w/out raster
Sandro Santilli
strk at kbt.io
Mon Oct 9 00:52:05 PDT 2017
On Mon, Oct 09, 2017 at 01:28:22AM -0400, Regina Obe wrote:
>
> > > - How users can upgrade from older versions of postgis
> > > p1: ALTER EXTENSION postgis UPDATE; CREATE EXTENSION
> > postgis_raster FROM unpackaged;
> >
> > The problem with this is you can't install postgis_raster from
> > unpackaged without first upgrading your raster by running
> > rtpostgis_upgrade.sql
>
> > Uhm, can you tell me more about why ?
> > I've tried doing this upgrading from "2.4.0" to "2.5.0dev" and didn't get an error.
>
> So did you embed the rtpostgis_upgrade script as part of
> Postgis upgrade scripts?
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 ?
> So now we need two sets of scripts don't we -- people coming from
> 2.0.0 --- 2.4... and another for people upgrading from 2.5 ---?
The unpackaging SQL does no harm so we can keep it in until we
drop support for upgrading from older versions. But if your
concern is the size of upgrade script (which with symlinks was
just reduced to take 1/33 of the space) we could have two.
> And if I don't want raster anymore do I have to do this
>
> ALTER EXTENSION postgis UPDATE;
> CREATE EXTENSION postgis_raster FROM unpackaged;
> DROP EXTENSION postgis_raster;
In the current state of the PR: yes.
A possible improvement could be that we try to do
the drop internally to the upgrade script and only
unpackage raster when dropping it is not possible
(I think you suggested this)
If we go there, you'd just do "ALTER EXTENSION postgis UPDATE"
and if you're not using raster you end up clean.
> 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 ?
-- would the following get me raster back in ?
ALTER EXTENSION postgis UPDATE;
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.
--strk;
More information about the postgis-users
mailing list