[postgis-devel] Is it possible to get rid of platform specific lwpostgis.sql files?

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Mon Oct 29 07:27:44 PDT 2007


On Thu, 2007-09-06 at 22:33 -0400, Tom Lane wrote:
> Charlie Savage <cfis at savagexi.com> writes:
> > The PostGis installation scripts generate different versions of 
> > lwpostgis.sql per platform.
> 
> > For example, here is Affine defined on Linux and Windows:
> 
> > CREATE OR REPLACE FUNCTION 
> > Affine(geometry,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8)
> > 	RETURNS geometry
> > 	AS '$libdir/liblwgeom.so.1.3', 'LWGEOM_affine'
> > 	LANGUAGE 'C' IMMUTABLE STRICT;
> 
> 
> > CREATE OR REPLACE FUNCTION 
> > Affine(geometry,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8)
> > 	RETURNS geometry
> > 	AS '$libdir/liblwgeom.dll', 'LWGEOM_affine'
> > 	LANGUAGE 'C' IMMUTABLE STRICT;
> 
> > Notice the library names are different. However, if you look at other 
> > postgresql contrib modules they don't do this.
> 
> This is definitely deprecated practice --- you should rely on dfmgr to
> supply the appropriate platform-specific extension.
> 
> 			regards, tom lane


Agreed. I've just committed a "quick fix" to remove the version
information from liblwgeom references in lwpostgis.sql. I haven't messed
with Makefile.shlib (as I'm hoping that when we drop support for
PostgreSQL < 8.0 we can use PGXS instead, and hence remove this whole
bunch of redundant code) since being a hacked version of the PostgreSQL
version, it looks fairly complicated...


ATB,

Mark.

-- 
ILande - Open Source Consultancy
http://www.ilande.co.uk





More information about the postgis-devel mailing list