Added support for PostgreSQL head, as suggested by Michael Fuhr.

Cleaned up includes.


git-svn-id: http://svn.osgeo.org/postgis/trunk@2076 b70326c6-7e19-0410-871a-916f4a2858ee
This commit is contained in:
Sandro Santilli 2005-11-25 16:14:25 +00:00
parent c7cfc2a518
commit c4a8df4d45
10 changed files with 21 additions and 12 deletions

View file

@ -25,8 +25,13 @@ PostGIS 1.1.0CVS
- Stricter mapping between DBF and SQL integer and string attributes
- Changed M() and Z() functions to return NULL if requested
dimension is not available
- Initial support for postgresql 8.2
PostGIS 1.0.5CVS
PostGIS 1.0.6CVS
- Fixed palloc(0) call in collection deserializer (only gives
problem with --enable-cassert)
PostGIS 1.0.5
2005/11/25
- New "Reporting Bugs" chapter in manual
- Segfault fix in shp2pgsql (utf8 encoding)

View file

@ -165,7 +165,11 @@ else
ifneq ($(findstring 8.0,$(VERSION)),)
USE_VERSION=80
else
USE_VERSION=81
ifneq ($(findstring 8.1,$(VERSION)),)
USE_VERSION=81
else
USE_VERSION=82
endif
endif
endif
endif

View 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"

View 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"

View file

@ -2101,7 +2101,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);
@ -2118,6 +2118,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));
@ -2208,7 +2211,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

View 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"

View file

@ -10,7 +10,6 @@
#include "access/gist.h"
#include "access/itup.h"
#include "access/rtree.h"
#include "fmgr.h"
#include "utils/elog.h"

View file

@ -8,7 +8,6 @@
#include "access/gist.h"
#include "access/itup.h"
#include "access/rtree.h"
#include "fmgr.h"
#include "utils/elog.h"

View file

@ -11,6 +11,10 @@
#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);

View file

@ -21,13 +21,10 @@
#include "access/gist.h"
#include "access/itup.h"
#include "access/rtree.h"
#include "fmgr.h"
#include "utils/elog.h"
#include "liblwgeom.h"
#include "lwgeom_pg.h"