From: Sandro Santilli Date: Fri, 19 Nov 2004 13:32:50 +0000 (+0000) Subject: Fixed IN/OUT representation of types to support < 73 PG versions X-Git-Tag: pgis_1_0_0RC1~191 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3898adb8cc47ac94cee3daa85fdc5b4fe85c4559;p=postgis Fixed IN/OUT representation of types to support < 73 PG versions git-svn-id: http://svn.osgeo.org/postgis/trunk@1104 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/lwgeom/lwpostgis.sql.in b/lwgeom/lwpostgis.sql.in index 2b035d9bf..698943986 100644 --- a/lwgeom/lwpostgis.sql.in +++ b/lwgeom/lwpostgis.sql.in @@ -82,12 +82,20 @@ CREATE TYPE spheroid ( -- GEOMETRY TYPE (lwgeom) ------------------------------------------------------------------- -CREATEFUNCTION geometry_in(cstring) +#if USE_VERSION < 73 +# define GEOMETRY_IN_REP opaque +# define GEOMETRY_OUT_REP opaque +#else +# define GEOMETRY_IN_REP geometry +# define GEOMETRY_OUT_REP cstring +#endif + +CREATEFUNCTION geometry_in(GEOMETRY_OUT_REP) RETURNS geometry AS '@MODULE_FILENAME@','LWGEOM_in' LANGUAGE 'C' WITH (isstrict,iscachable); -CREATEFUNCTION geometry_out(geometry) +CREATEFUNCTION geometry_out(GEOMETRY_IN_REP) RETURNS cstring AS '@MODULE_FILENAME@','LWGEOM_out' LANGUAGE 'C' WITH (isstrict,iscachable); @@ -220,12 +228,21 @@ CREATE TYPE chip ( -- BOX2D ----------------------------------------------------------------------- -CREATEFUNCTION box2d_in(cstring) + +#if USE_VERSION < 73 +# define BOX2D_IN_REP opaque +# define BOX2D_OUT_REP opaque +#else +# define BOX2D_IN_REP box2d +# define BOX2D_OUT_REP cstring +#endif + +CREATEFUNCTION box2d_in(BOX2D_OUT_REP) RETURNS box2d AS '@MODULE_FILENAME@','BOX2DFLOAT4_in' LANGUAGE 'C' WITH (isstrict,iscachable); -CREATEFUNCTION box2d_out(box2d) +CREATEFUNCTION box2d_out(BOX2D_IN_REP) RETURNS cstring AS '@MODULE_FILENAME@','BOX2DFLOAT4_out' LANGUAGE 'C' WITH (isstrict,iscachable);