[postgis-tickets] [PostGIS] #3890: Allow users ability to install postgis extenions without raster by encoding noraster in the extension version
PostGIS
trac at osgeo.org
Sun Oct 8 14:19:03 PDT 2017
#3890: Allow users ability to install postgis extenions without raster by encoding
noraster in the extension version
--------------------------+---------------------------
Reporter: robe | Owner: pramsey
Type: enhancement | Status: new
Priority: medium | Milestone: PostGIS 2.5.0
Component: postgis | Version: trunk
Resolution: | Keywords:
--------------------------+---------------------------
Changes (by robe):
* version: 2.4.x => trunk
* type: defect => enhancement
Old description:
> This replaces #3859 which has gotten too crowded.
>
> Right now if someone does
>
> {{{
> ./configure --without-raster
> }}}
>
> They don't get any extension scripts. Several folks have complained
> about not being able to take advantage of extension machinery if they
> choose to compile without raster.
>
> My proposal is to allow generation of such scripts, but encode it in the
> extension version which I propose to be called
>
> 2.5.0noraster.
>
> The objective of this 3-fold
>
> 1. Allow users who can't compile with GDAL enjoy the same extension
> machinery as everyone else
>
> 2. Allow users who have a compilation with geometry/geography/raster
> enjoy the additional option of a postgis with raster and a postgis
> without.
>
> This will appease those folks who say -- but for this database, I have to
> wade thru all these beautiful raster functions to see the geometry
> functions. It confuses me to have an ST_Intersection for geometry and
> one for raster. Too many choices for my tiny brain to fathom.
>
> 3. Not break backward-compatibility to achieve the first 2.
>
>
> So how does this work
>
> 1. So a user compiling --without-raster would get installed a
> postgis.control file that looks like below and would get only extension
> scripts with that end in noraster.sql
>
> {{{
> # postgis extension
> comment = 'PostGIS geometry, geography, and raster spatial types and
> functions'
> default_version = '2.5.0noraster'
> module_pathname = '$libdir/postgis-2.5'
> relocatable = false
>
> }}}
>
> 2. Users who compile the normal way (essentially asking for raster), will
> have both set of scripts installed, but their postgis.control file will
> look as it always has
>
> {{{
>
> # postgis extension
> comment = 'PostGIS geometry, geography, and raster spatial types and
> functions'
> default_version = '2.5.0'
> module_pathname = '$libdir/postgis-2.5'
> relocatable = false
>
> }}}
>
> 3. If users like having both options but want the noraster as the default
> for their users (this is actually pretty useful for DbaaS or folks
> dealing with clueless users)
>
> They can edit the postgis.control file and set the default_version to
> "2.5.0noraster"
>
> Therefore only their raster users will be inconvenienced with having to
> explicitly ask for the version.
>
> 4. If we want to be super nice (though not necessary), we can install
> scripts that allow switching back and forth between the two modes.
>
> So a postgis-2.5.0--2.5.0noraster.sql would drop the raster type and
> raster functions.
>
> a script postgis-2.5.0noraster--2.5.0.sql would add the raster type and
> raster functions.
>
> On the user side, taking advantage of this can be done with:
>
> {{{
>
> -- drops raster type and functions if you have a full install
> ALTER EXENSION postgis UPDATE "2.5.0noraster";
>
> -- adds raster type and functions if you have a noraster install
>
> ALTER EXENSION postgis UPDATE "2.5.0";
> }}}
New description:
This replaces #3859 which has gotten too crowded.
Right now if someone does
{{{
./configure --without-raster
}}}
They don't get any extension scripts. Several folks have complained about
not being able to take advantage of extension machinery if they choose to
compile without raster.
My proposal is to allow generation of such scripts, but encode it in the
extension version which I propose to be called
2.5.0noraster.
The objective of this 3-fold
1. Allow users who can't compile with GDAL enjoy the same extension
machinery as everyone else
2. Allow users who have a compilation with geometry/geography/raster enjoy
the additional option of a postgis with raster and a postgis without.
This will appease those folks who say -- but for this database, I have to
wade thru all these beautiful raster functions to see the geometry
functions. It confuses me to have an ST_Intersection for geometry and one
for raster. Too many choices for my tiny brain to fathom.
3. Not break backward-compatibility to achieve the first 2.
So how does this work
1. So a user compiling --without-raster would get installed a
postgis.control file that looks like below and would get only extension
scripts with that end in noraster.sql
{{{
# postgis extension
comment = 'PostGIS geometry, geography, and raster spatial types and
functions'
default_version = '2.5.0noraster'
module_pathname = '$libdir/postgis-2.5'
relocatable = false
}}}
This allows their users to do
{{{
CREATE EXTENSION postgis;
}}}
Just like everyone else, without having to read the manual.
2. Users who compile the normal way (essentially asking for raster), will
have both set of scripts installed, but their postgis.control file will
look as it always has
{{{
# postgis extension
comment = 'PostGIS geometry, geography, and raster spatial types and
functions'
default_version = '2.5.0'
module_pathname = '$libdir/postgis-2.5'
relocatable = false
}}}
3. If users like having both options but want the noraster as the default
for their users (this is actually pretty useful for DbaaS or folks dealing
with clueless users)
They can edit the postgis.control file and set the default_version to
"2.5.0noraster"
Therefore only their raster users will be inconvenienced with having to
explicitly ask for the version.
4. If we want to be super nice (though not necessary), we can install
scripts that allow switching back and forth between the two modes.
So a postgis-2.5.0--2.5.0noraster.sql would drop the raster type and
raster functions.
a script postgis-2.5.0noraster--2.5.0.sql would add the raster type and
raster functions.
On the user side, taking advantage of this can be done with:
{{{
-- drops raster type and functions if you have a full install
ALTER EXENSION postgis UPDATE "2.5.0noraster";
-- adds raster type and functions if you have a noraster install
ALTER EXENSION postgis UPDATE "2.5.0";
}}}
--
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3890#comment:1>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list