[postgis-devel] MODULE_FILENAME change proposal

strk at refractions.net strk at refractions.net
Thu Dec 15 07:03:35 PST 2005


Making some research for defining a Version scheme for PostGIS 
if found what I think to be a bug in the formation of MODULE_FILENAME
(the value used in CREATE FUNCTION for C functions).

The "bug" has been there since the 0.x branch.

The problem is that we use '$libdir/$(shlib)' while $(shlib)
changes between architectures.

Under GNU/Linux shlib contains MAJOR and MINOR versions.
Under FreeBSD only MAJOR version is used.

This means that whenever SO_MINOR_VERSION is incremented
we obtain two different behaviours in the two systems:

	- Existing spatial DBs under FreeBSD will automatically 
	  use the NEW (1.1) library

	- Existing spatial DBs under GNU/Linux will continue
	  to use the OLD (1.0) library.

Note that the FreeBSD way is likely the one used under any SVR4
arch (Solaris for example, can anyone confirm?).

So, I think we should end this discrepancy by *always* using MAJOR
version *only* to encode cases in which existing databases will NOT be
able to work against new PostGIS versions.

This was the case in the transition between 0.x and 1.x branches
(HWGEOM->LWGEOM).
At the time we choosed to completely change postgis library name
to avoid troubles (I hadn't been brave enough ;)

Does it sound fair to all ?

--strk;



More information about the postgis-devel mailing list