[postgis-tickets] [PostGIS] #3338: postgis extension no-raster version (was: postgis extension that returns not supported for all Raster functions if raster not available)

PostGIS trac at osgeo.org
Fri Oct 23 18:19:52 PDT 2015


#3338: postgis extension no-raster version
----------------------+---------------------------
  Reporter:  robe     |      Owner:  robe
      Type:  defect   |     Status:  new
  Priority:  medium   |  Milestone:  PostGIS 2.3.0
 Component:  postgis  |    Version:  2.0.x
Resolution:           |   Keywords:
----------------------+---------------------------

Comment (by robe):

 I just thought of a really stupid or super brilliant idea to resolve this
 issue.

 The main reason we can't have 2 extensions called postgis with the same
 version number (1 having raster and 1 not) is because then it can't be
 easily upgraded.

 However there is no rule against having two postgis extensions as long as
 they have different versions.  Since versions don't have to be all
 numbers, we can encode the lack of raster right in the version.

 Sooo.


 version = 2.3.0
 version = 2.3.0-no-raster

 I propose if people compile with raster support, they get old behavior,
 without raster support they get this new wonder 2.3.0-no-raster version.

 There are 3 benefits of doing it this way.


 1. Most extensions that rely on PostGIS just use the vector portion, so
 keeping the name the same they can continue on without having to change
 their requires.

 2. We have the same set of instructions for everybody:


 {{{
 CREATE EXTENSION postgis;
 }}}


 3. With the version differentiator it's trivial to upgrade a version 2.3.0
 -no-raster to a full yummy 2.3.0 version.  We just add upgrade scripts to
 go from 2.3.0-no-raster to 2.3.0 regular postgis

 4. Similarly we can have a 2.3.0--2.3.0-no-raster that gets installed if
 you compile without raster support. Which will drop all the raster
 functions during the upgrade.

 What do folks think about this?  Am I nuts or is this a great idea?

--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3338#comment:10>
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