Opened 3 years ago

Closed 2 years ago

#3890 closed enhancement (wontfix)

Allow users ability to install postgis extenions without raster by encoding noraster in the extension version

Reported by: robe Owned by: robe
Priority: medium Milestone: PostGIS 3.0.0
Component: postgis Version: master
Keywords: Cc:

Description (last modified by robe)

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
  1. 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.

  1. 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.

  1. 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

  1. 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.

  1. 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";

Change History (4)

comment:1 Changed 3 years ago by robe

Description: modified (diff)
Type: defectenhancement
Version: 2.4.xtrunk

comment:2 Changed 3 years ago by robe

Owner: changed from pramsey to robe

comment:3 Changed 2 years ago by komzpa

Milestone: PostGIS 2.5.0PostGIS 3.0.0

Another version of implementing it is in #3888.

comment:4 Changed 2 years ago by strk

Resolution: wontfix
Status: newclosed

#3888 went trough instead of this

Note: See TracTickets for help on using tickets.