]> granicus.if.org Git - postgis/commitdiff
Back-ported support for PGSQL8.2
authorSandro Santilli <strk@keybit.net>
Wed, 30 Nov 2005 16:58:14 +0000 (16:58 +0000)
committerSandro Santilli <strk@keybit.net>
Wed, 30 Nov 2005 16:58:14 +0000 (16:58 +0000)
git-svn-id: http://svn.osgeo.org/postgis/branches/pgis_1_0@2102 b70326c6-7e19-0410-871a-916f4a2858ee

CHANGES
lwgeom/lwgeom_box2dfloat4.c
lwgeom/lwgeom_chip.c
lwgeom/lwgeom_functions_basic.c
lwgeom/lwgeom_gist.c
lwgeom/lwgeom_inout.c
lwgeom/lwgeom_ogc.c
lwgeom/lwgeom_pg.h
lwgeom/lwgeom_spheroid.c

diff --git a/CHANGES b/CHANGES
index 324716922b52594b23cefef308a6e8a80a1ee6fc..caa865541653b3f31eb4a834ed7d41779deb19bf 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -3,6 +3,7 @@ PostGIS 1.0.6CVS
          problem with --enable-cassert)
        - Fixed bbox cache handling bugs
        - Fixed geom_accum(NULL, NULL) segfault
+       - Initial support for postgresql 8.2
 
 PostGIS 1.0.5
 2005/11/25
index 7e8c44955fc968c8541e3094d3564b112c56f3b8..a1077f1ba33392389c2f3550f1b3c775c7160d8d 100644 (file)
@@ -7,7 +7,6 @@
 #include "postgres.h"
 #include "access/gist.h"
 #include "access/itup.h"
-#include "access/rtree.h"
 #include "fmgr.h"
 #include "utils/elog.h"
 #include "utils/geo_decls.h"
index b540a0d57a7d69c295c9c5e801a3ebfed0d31fd9..3f1baceaa410938fc7a54b2507d60ee6c019f8b6 100644 (file)
@@ -7,7 +7,6 @@
 #include "postgres.h"
 #include "access/gist.h"
 #include "access/itup.h"
-#include "access/rtree.h"
 #include "fmgr.h"
 #include "utils/elog.h"
 
index 8fb3920b2ac23ad95187d3fb29c18cf5a918eeef..917477c1597f37d030e8ff9ff7901ff4f46fca4f 100644 (file)
@@ -1805,7 +1805,7 @@ Datum LWGEOM_accum(PG_FUNCTION_ARGS)
         */
        ++nelems;
        if ( nelems == 1 || ! array ) {
-               nbytes = ARR_OVERHEAD(1)+INTALIGN(geom->size);
+               nbytes = ARR_OVERHEAD_NONULLS(1)+INTALIGN(geom->size);
 #ifdef PGIS_DEBUG
                elog(NOTICE, "geom_accum: adding %p (nelems=%d; nbytes=%d)",
                        geom, nelems, nbytes);
@@ -1822,6 +1822,9 @@ Datum LWGEOM_accum(PG_FUNCTION_ARGS)
 
 #if USE_VERSION > 72
                result->elemtype = oid;
+#endif
+#if USE_VERSION > 81
+               result->dataoffset = 0;
 #endif
                memcpy(ARR_DIMS(result), &nelems, sizeof(int));
                memcpy(ARR_LBOUND(result), &lbs, sizeof(int));
@@ -1912,7 +1915,7 @@ Datum LWGEOM_collect_garray(PG_FUNCTION_ARGS)
 
 #ifdef PGIS_DEBUG
        elog(NOTICE, " array is %d-bytes in size, %d w/out header",
-               array->size, array->size-ARR_OVERHEAD(ARR_NDIM(array)));
+               array->size, array->size-ARR_OVERHEAD_NONULLS(ARR_NDIM(array)));
 #endif
 
 
index a09b4935f06759f18293e9e846ad2cefb6bb87df..902aba0e7aa237eb082ae89ae50e09baef037eb8 100644 (file)
@@ -8,7 +8,7 @@
 #include "access/gist.h"
 #include "access/itup.h"
 #if USE_VERSION > 80
-#include "access/rtree.h"
+#include "access/skey.h"
 #endif
 #include "fmgr.h"
 #include "utils/elog.h"
index f218d5d66f7e894a22c23e977d109f95928eb276..5d2e0f99affd16b7d19231f958d9727b1b5b4ace 100644 (file)
@@ -10,7 +10,6 @@
 
 #include "access/gist.h"
 #include "access/itup.h"
-#include "access/rtree.h"
 
 #include "fmgr.h"
 #include "utils/elog.h"
index b3cb5a8bbe1cbc6c1501d6b7972b2d60e9ddfade..bb676b2793f4aa272056fcd4866261551d0f4834 100644 (file)
@@ -8,7 +8,6 @@
 
 #include "access/gist.h"
 #include "access/itup.h"
-#include "access/rtree.h"
 
 #include "fmgr.h"
 #include "utils/elog.h"
index 6999f0190e02c07037efac4df8bfe24eddadc0f2..46e54eab7774282b96f5586dac9565c3fb8f3011 100644 (file)
 #define PG_NARGS() (fcinfo->nargs)
 #endif
 
+#if USE_VERSION < 82
+#define ARR_OVERHEAD_NONULLS(x) ARR_OVERHEAD((x))
+#endif
+
 void *pg_alloc(size_t size);
 void *pg_realloc(void *ptr, size_t size);
 void pg_free(void *ptr);
index d3dda2af4bfe44bb12752cded59a502e72425fdf..57e90bb33ddb00640bdb43447b95f121b6d9da0b 100644 (file)
@@ -21,7 +21,6 @@
 
 #include "access/gist.h"
 #include "access/itup.h"
-#include "access/rtree.h"
 
 
 #include "fmgr.h"