]> granicus.if.org Git - postgis/commitdiff
Fixed IN/OUT representation of types to support < 73 PG versions
authorSandro Santilli <strk@keybit.net>
Fri, 19 Nov 2004 13:32:50 +0000 (13:32 +0000)
committerSandro Santilli <strk@keybit.net>
Fri, 19 Nov 2004 13:32:50 +0000 (13:32 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@1104 b70326c6-7e19-0410-871a-916f4a2858ee

lwgeom/lwpostgis.sql.in

index 2b035d9bfc91325accc94e4ca3db34a5f7fb7fad..698943986cc7b7c9696f84c634b592db6c5fb467 100644 (file)
@@ -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);