]> granicus.if.org Git - postgis/commitdiff
PostgreSQL 8.4 support (#62)
authorPaul Ramsey <pramsey@cleverelephant.ca>
Tue, 11 Nov 2008 20:38:10 +0000 (20:38 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Tue, 11 Nov 2008 20:38:10 +0000 (20:38 +0000)
git-svn-id: http://svn.osgeo.org/postgis/branches/1.3@3287 b70326c6-7e19-0410-871a-916f4a2858ee

lwgeom/lwgeom_gist.c
lwgeom/lwpostgis.sql.in
regress/run_test

index 6755fc39ac946860b5be387095f9ed85a9d537a7..55a6371bc90240cf2130d764f1f021d6437b61ff 100644 (file)
@@ -598,6 +598,16 @@ Datum LWGEOM_gist_consistent(PG_FUNCTION_ARGS)
        uchar *serialized_lwgeom;
 #endif
 
+#if USE_VERSION >= 84
+       /* PostgreSQL 8.4 and later require the RECHECK flag to be set here,
+          rather than being supplied as part of the operator class definition */
+       bool *recheck = (bool *) PG_GETARG_POINTER(4);
+
+       /* And since the index is lossy from conversion from float8 to float4, we must
+       recheck */
+       *recheck = true;
+#endif
+
 #ifdef PGIS_DEBUG_CALLS
        elog(NOTICE,"GIST: LWGEOM_gist_consistent called");
 #endif
index 8a46d742a2022a1a9b61d8eef42e9dd5e13ad3bc..86f9fb396500c8b06ca4565cfb936f708a88ed83 100644 (file)
@@ -1305,8 +1305,10 @@ INSERT INTO pg_amproc (amopclaid, amprocnum, amproc)
 
 #else
 
+#if USE_VERSION < 84 
+
 --
--- Create opclass index bindings for PG>=73
+-- Create opclass index bindings for PG>=73 and PG<=83
 --
 
 CREATE OPERATOR CLASS gist_geometry_ops
@@ -1342,6 +1344,38 @@ UPDATE pg_opclass
        
 -- TODO: add btree binding...
 
+#else
+
+--
+-- Create opclass index bindings for PG>83 
+-- (No RECHECK since this is now handled as part of the GiST Access methods)
+--
+
+CREATE OPERATOR CLASS gist_geometry_ops
+       DEFAULT FOR TYPE geometry USING gist AS
+       STORAGE         box2d,
+       OPERATOR        1        <<,
+       OPERATOR        2        &<,
+       OPERATOR        3        &&,
+       OPERATOR        4        &>,
+       OPERATOR        5        >>,
+       OPERATOR        6        ~=,
+       OPERATOR        7        ~,
+       OPERATOR        8        @,
+       OPERATOR        9        &<|,
+       OPERATOR        10       <<|,
+       OPERATOR        11       |>>,
+       OPERATOR        12       |&>,
+       FUNCTION        1        LWGEOM_gist_consistent (internal, geometry, int4),
+       FUNCTION        2        LWGEOM_gist_union (bytea, internal),
+       FUNCTION        3        LWGEOM_gist_compress (internal),
+       FUNCTION        4        LWGEOM_gist_decompress (internal),
+       FUNCTION        5        LWGEOM_gist_penalty (internal, internal, internal),
+       FUNCTION        6        LWGEOM_gist_picksplit (internal, internal),
+       FUNCTION        7        LWGEOM_gist_same (box2d, box2d, internal);
+
+#endif
+
 #endif
        
 -------------------------------------------
index 791efffc53f84a4525595f0fda314f56b6bdbb4a..5a170909f07128bb822497ee583979bc5bcc218a 100755 (executable)
@@ -123,6 +123,8 @@ run_simple_test ()
                | grep -v "^DROP" \
                | grep -v "^CREATE" \
                | grep -v "^SET" \
+               | grep -v "^LINE " \
+               | grep -v "\^$" \
                | sed 's/Infinity/inf/g;s/Inf/inf/g;s/1\.#INF/inf/g' \
                | sed 's/[eE]\([+-]\)0\{1,\}\([0-9]\{1,\}\)/e\1\2/g' \
                | sed 's/Self-intersection .*/Self-intersection/' \