Commit 06eebf5b authored by Darafei Praliaskouski's avatar Darafei Praliaskouski

Remove support for Postgres < 9.5.

Closes https://github.com/postgis/postgis/pull/349
Closes #4229


git-svn-id: http://svn.osgeo.org/postgis/trunk@17095 b70326c6-7e19-0410-871a-916f4a2858ee
parent 81ae26e4
Pipeline #38725657 passed with stage
in 33 minutes and 8 seconds
......@@ -8,7 +8,8 @@ PostGIS 3.0.0
if you need the old behavior (Regina Obe)
- #4230, ND box operators (overlaps, contains, within, equals) now don't look on
dimentions that aren't present in both operands.
Please REINDEX your ND indexes after upgrade.
Please REINDEX your ND indexes after upgrade. (Darafei Praliaskouski)
- #4229, Dropped support for PostgreSQL < 9.5. (Darafei Praliaskouski)
* New Features *
- #2902, postgis_geos_noop (Sandro Santilli)
......
......@@ -468,11 +468,6 @@ if test "x$LIBLWGEOM_ONLY" = "xno"; then
AC_MSG_ERROR([PostGIS requires PostgreSQL >= 9.5])
fi
HAVE_BRIN=no
if test $POSTGIS_PGSQL_VERSION -gt 94; then
HAVE_BRIN=yes
fi
HAVE_SPGIST=no
if test $POSTGIS_PGSQL_VERSION -gt 100; then
HAVE_SPGIST=yes
......@@ -546,7 +541,6 @@ if test "x$LIBLWGEOM_ONLY" = "xno"; then
AC_DEFINE_UNQUOTED([POSTGIS_PGSQL_VERSION], [$POSTGIS_PGSQL_VERSION], [PostgreSQL server version])
AC_SUBST([POSTGIS_PGSQL_VERSION])
AC_SUBST([HAVE_BRIN])
AC_SUBST([HAVE_SPGIST])
fi dnl LIBLWGEOM_ONLY != no
......
......@@ -124,14 +124,6 @@ GSERIALIZED* geography_serialize(LWGEOM *lwgeom);
*/
int gserialized_datum_get_gbox_p(Datum gsdatum, GBOX *gbox);
/*
* For PostgreSQL >= 8.5 redefine the STATRELATT macro to its
* new value of STATRELATTINH
*/
#if POSTGIS_PGSQL_VERSION >= 85
#define STATRELATT STATRELATTINH
#endif
/* PG-exposed */
Datum BOX2D_same(PG_FUNCTION_ARGS);
Datum BOX2D_overlap(PG_FUNCTION_ARGS);
......@@ -151,34 +143,32 @@ Datum BOX2D_union(PG_FUNCTION_ARGS);
Datum LWGEOM_same(PG_FUNCTION_ARGS);
/** needed for sp-gist support PostgreSQL 11+ **/
//#if POSTGIS_PGSQL_VERSION > 100
Datum BOX3D_construct(PG_FUNCTION_ARGS);
Datum LWGEOM_to_BOX2DF(PG_FUNCTION_ARGS);
Datum LWGEOM_to_BOX3D(PG_FUNCTION_ARGS);
Datum BOX3D_contains(PG_FUNCTION_ARGS);
Datum BOX3D_contained(PG_FUNCTION_ARGS);
Datum BOX3D_overlaps(PG_FUNCTION_ARGS);
Datum BOX3D_same(PG_FUNCTION_ARGS);
Datum BOX3D_left(PG_FUNCTION_ARGS);
Datum BOX3D_overleft(PG_FUNCTION_ARGS);
Datum BOX3D_right(PG_FUNCTION_ARGS) ;
Datum BOX3D_overright(PG_FUNCTION_ARGS);
Datum BOX3D_below(PG_FUNCTION_ARGS);
Datum BOX3D_overbelow(PG_FUNCTION_ARGS);
Datum BOX3D_above(PG_FUNCTION_ARGS);
Datum BOX3D_overabove(PG_FUNCTION_ARGS);
Datum BOX3D_front(PG_FUNCTION_ARGS);
Datum BOX3D_overfront(PG_FUNCTION_ARGS);
Datum BOX3D_back(PG_FUNCTION_ARGS);
Datum BOX3D_overback(PG_FUNCTION_ARGS);
Datum BOX3D_distance(PG_FUNCTION_ARGS);
#define DatumGetBox3DP(X) ((BOX3D *) DatumGetPointer(X))
#define Box3DPGetDatum(X) PointerGetDatum(X)
#define PG_GETARG_BOX3D_P(n) DatumGetBox3DP(PG_GETARG_DATUM(n))
#define PG_RETURN_BOX3D_P(x) return Box3DPGetDatum(x)
//#endif
Datum BOX3D_construct(PG_FUNCTION_ARGS);
Datum LWGEOM_to_BOX2DF(PG_FUNCTION_ARGS);
Datum LWGEOM_to_BOX3D(PG_FUNCTION_ARGS);
Datum BOX3D_contains(PG_FUNCTION_ARGS);
Datum BOX3D_contained(PG_FUNCTION_ARGS);
Datum BOX3D_overlaps(PG_FUNCTION_ARGS);
Datum BOX3D_same(PG_FUNCTION_ARGS);
Datum BOX3D_left(PG_FUNCTION_ARGS);
Datum BOX3D_overleft(PG_FUNCTION_ARGS);
Datum BOX3D_right(PG_FUNCTION_ARGS);
Datum BOX3D_overright(PG_FUNCTION_ARGS);
Datum BOX3D_below(PG_FUNCTION_ARGS);
Datum BOX3D_overbelow(PG_FUNCTION_ARGS);
Datum BOX3D_above(PG_FUNCTION_ARGS);
Datum BOX3D_overabove(PG_FUNCTION_ARGS);
Datum BOX3D_front(PG_FUNCTION_ARGS);
Datum BOX3D_overfront(PG_FUNCTION_ARGS);
Datum BOX3D_back(PG_FUNCTION_ARGS);
Datum BOX3D_overback(PG_FUNCTION_ARGS);
Datum BOX3D_distance(PG_FUNCTION_ARGS);
#define DatumGetBox3DP(X) ((BOX3D *)DatumGetPointer(X))
#define Box3DPGetDatum(X) PointerGetDatum(X)
#define PG_GETARG_BOX3D_P(n) DatumGetBox3DP(PG_GETARG_DATUM(n))
#define PG_RETURN_BOX3D_P(x) return Box3DPGetDatum(x)
Datum LWGEOM_force_2d(PG_FUNCTION_ARGS);
Datum LWGEOM_force_3dm(PG_FUNCTION_ARGS);
......
......@@ -32,10 +32,6 @@ MODULEPATH=$$libdir/postgis-@POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@
MODULE_big=postgis-@POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@
endif
ifeq (@HAVE_BRIN@,yes)
BRIN_OBJ= brin_2d.o brin_nd.o brin_common.o
endif
# Files to be copied to the contrib/ directory
SQL_built=postgis.sql postgis_for_extension.sql uninstall_postgis.sql postgis_upgrade.sql postgis_upgrade_for_extension.sql postgis_proc_set_search_path.sql legacy.sql uninstall_legacy.sql legacy_minimal.sql legacy_gist.sql
DATA=../spatial_ref_sys.sql
......@@ -56,10 +52,6 @@ DATA_built=$(SQL_built)
SQL_OBJS=$(SQL_objs)
endif
ifeq (@HAVE_BRIN@,yes)
BRIN_OBJ= brin_2d.o brin_nd.o brin_common.o
endif
ifeq (@HAVE_SPGIST@,yes)
SPGIST_OBJ= gserialized_spgist_2d.o gserialized_spgist_3d.o gserialized_spgist_nd.o
endif
......@@ -109,7 +101,9 @@ PG_OBJS= \
gserialized_gist_2d.o \
gserialized_gist_nd.o \
$(SPGIST_OBJ) \
$(BRIN_OBJ) \
brin_2d.o \
brin_nd.o \
brin_common.o \
gserialized_estimate.o \
geography_inout.o \
geography_btree.o \
......
#if POSTGIS_PGSQL_VERSION > 94
--------------------------------------------------------------------
-- BRIN support for geographies --
--------------------------------------------------------------------
......@@ -72,5 +71,3 @@ CREATE OPERATOR CLASS brin_geography_inclusion_ops
OPERATOR 3 &&(gidx, geography),
OPERATOR 3 &&(gidx, gidx),
STORAGE gidx;
#endif
......@@ -102,9 +102,7 @@ dimensionality cases. (2D geometry) &&& (3D column), etc.
#include "../postgis_config.h"
#if POSTGIS_PGSQL_VERSION >= 93
#include "access/htup_details.h"
#endif
#include "access/htup_details.h"
#include "stringbuffer.h"
#include "liblwgeom.h"
......@@ -147,15 +145,15 @@ static GBOX * spatial_index_read_extent(Oid idx_oid, int key_type);
Datum geometry_estimated_extent(PG_FUNCTION_ARGS);
/*
* Assign a number to the n-dimensional statistics kind
*
* tgl suggested:
*
* 1-100: reserved for assignment by the core Postgres project
* 100-199: reserved for assignment by PostGIS
* 200-9999: reserved for other globally-known stats kinds
* 10000-32767: reserved for private site-local use
*/
* Assign a number to the n-dimensional statistics kind
*
* tgl suggested:
*
* 1-100: reserved for assignment by the core Postgres project
* 100-199: reserved for assignment by PostGIS
* 200-9999: reserved for other globally-known stats kinds
* 10000-32767: reserved for private site-local use
*/
#define STATISTIC_KIND_ND 102
#define STATISTIC_KIND_2D 103
#define STATISTIC_SLOT_ND 0
......
......@@ -108,15 +108,12 @@ Datum gserialized_overabove_2d(PG_FUNCTION_ARGS);
Datum gserialized_overbelow_2d(PG_FUNCTION_ARGS);
Datum gserialized_distance_box_2d(PG_FUNCTION_ARGS);
Datum gserialized_distance_centroid_2d(PG_FUNCTION_ARGS);
#if POSTGIS_PGSQL_VERSION > 94
Datum gserialized_contains_box2df_geom_2d(PG_FUNCTION_ARGS);
Datum gserialized_contains_box2df_box2df_2d(PG_FUNCTION_ARGS);
Datum gserialized_within_box2df_geom_2d(PG_FUNCTION_ARGS);
Datum gserialized_within_box2df_box2df_2d(PG_FUNCTION_ARGS);
Datum gserialized_overlaps_box2df_geom_2d(PG_FUNCTION_ARGS);
Datum gserialized_overlaps_box2df_box2df_2d(PG_FUNCTION_ARGS);
#endif
/*
** true/false test function type
......@@ -492,83 +489,6 @@ static double box2df_distance_leaf_centroid(const BOX2DF *a, const BOX2DF *b)
return sqrt((a_x - b_x) * (a_x - b_x) + (a_y - b_y) * (a_y - b_y));
}
#if POSTGIS_PGSQL_VERSION < 95
/**
* Calculate the The node_box_edge->query_centroid distance
* between the boxes.
*/
static double box2df_distance_node_centroid(const BOX2DF *node, const BOX2DF *query)
{
BOX2DF q;
double qx, qy;
double d = 0.0;
/* Turn query into point */
q.xmin = q.xmax = (query->xmin + query->xmax) / 2.0;
q.ymin = q.ymax = (query->ymin + query->ymax) / 2.0;
qx = q.xmin;
qy = q.ymin;
/* Check for overlap */
if ( box2df_overlaps(node, &q) == LW_TRUE )
return 0.0;
/* Above or below */
if ( qx >= node->xmin && qx <= node->xmax )
{
if( qy > node->ymax )
d = qy - node->ymax;
else if ( qy < node->ymin )
d = node->ymin - qy;
return d;
}
/* Left or right */
else if ( qy >= node->ymin && qy <= node->ymax )
{
if ( qx > node->xmax )
d = qx - node->xmax;
else if ( qx < node->xmin )
d = node->xmin - qx;
return d;
}
/* Corner quadrants */
else
{
/* below/left of xmin/ymin */
if ( qx < node->xmin && qy < node->ymin )
{
d = (node->xmin - qx) * (node->xmin - qx) +
(node->ymin - qy) * (node->ymin - qy);
}
/* above/left of xmin/ymax */
else if ( qx < node->xmin && qy > node->ymax )
{
d = (node->xmin - qx) * (node->xmin - qx) +
(node->ymax - qy) * (node->ymax - qy);
}
/* above/right of xmax/ymax */
else if ( qx > node->xmax && qy > node->ymax )
{
d = (node->xmax - qx) * (node->xmax - qx) +
(node->ymax - qy) * (node->ymax - qy);
}
/* below/right of xmax/ymin */
else if ( qx > node->xmin && qy < node->ymin )
{
d = (node->xmax - qx) * (node->xmax - qx) +
(node->ymin - qy) * (node->ymin - qy);
}
else
{
/*ERROR*/
elog(ERROR, "%s: reached unreachable code", __func__);
}
}
return sqrt(d);
}
#endif
/* Quick distance function */
static inline double pt_distance(double ax, double ay, double bx, double by)
{
......@@ -707,7 +627,6 @@ gserialized_datum_predicate_2d(Datum gs1, Datum gs2, box2df_predicate predicate)
return LW_FALSE;
}
#if POSTGIS_PGSQL_VERSION > 94
static int
gserialized_datum_predicate_box2df_geom_2d(const BOX2DF *br1, Datum gs2, box2df_predicate predicate)
{
......@@ -784,7 +703,6 @@ Datum gserialized_overlaps_box2df_box2df_2d(PG_FUNCTION_ARGS)
PG_RETURN_BOOL(false);
}
#endif
/***********************************************************************
* GiST 2-D Index Operator Functions
......@@ -1254,9 +1172,7 @@ Datum gserialized_gist_distance_2d(PG_FUNCTION_ARGS)
BOX2DF *entry_box;
StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
double distance;
#if POSTGIS_PGSQL_VERSION >= 95
bool *recheck = (bool *) PG_GETARG_POINTER(4);
#endif
POSTGIS_DEBUG(4, "[GIST] 'distance' function called");
......@@ -1277,8 +1193,6 @@ Datum gserialized_gist_distance_2d(PG_FUNCTION_ARGS)
/* Get the entry box */
entry_box = (BOX2DF*)DatumGetPointer(entry->key);
#if POSTGIS_PGSQL_VERSION >= 95
/* Box-style distance test */
if ( strategy == 14 ) /* operator <#> */
{
......@@ -1300,26 +1214,6 @@ Datum gserialized_gist_distance_2d(PG_FUNCTION_ARGS)
elog(ERROR, "%s: reached unreachable code", __func__);
PG_RETURN_NULL();
}
#else
/* Box-style distance test */
if ( strategy == 14 )
{
distance = (double)box2df_distance(entry_box, &query_box);
PG_RETURN_FLOAT8(distance);
}
/* Treat leaf node tests different from internal nodes */
if (GIST_LEAF(entry))
{
/* Calculate distance to leaves */
distance = (double)box2df_distance_leaf_centroid(entry_box, &query_box);
}
else
{
/* Calculate distance for internal nodes */
distance = (double)box2df_distance_node_centroid(entry_box, &query_box);
}
#endif
PG_RETURN_FLOAT8(distance);
}
......
......@@ -774,7 +774,6 @@ Datum gserialized_within(PG_FUNCTION_ARGS)
PG_RETURN_BOOL(false);
}
#if POSTGIS_PGSQL_VERSION > 94
/*
** '~~' and operator function. Based on a GIDX and a serialized return true if
** the first is contained by the second.
......@@ -802,7 +801,6 @@ Datum gserialized_gidx_gidx_within(PG_FUNCTION_ARGS)
PG_RETURN_BOOL(false);
}
#endif
/*
** '@@' and operator function. Based on two serialized return true if
......
......@@ -1244,11 +1244,7 @@ Datum LWGEOM_collect_garray(PG_FUNCTION_ARGS)
count = 0;
outtype = 0;
#if POSTGIS_PGSQL_VERSION >= 95
iterator = array_create_iterator(array, 0, NULL);
#else
iterator = array_create_iterator(array, 0);
#endif
while (array_iterate(iterator, &value, &isnull))
{
......@@ -1420,11 +1416,7 @@ Datum LWGEOM_makeline_garray(PG_FUNCTION_ARGS)
geoms = palloc(sizeof(LWGEOM *) * nelems);
ngeoms = 0;
#if POSTGIS_PGSQL_VERSION >= 95
iterator = array_create_iterator(array, 0, NULL);
#else
iterator = array_create_iterator(array, 0);
#endif
while (array_iterate(iterator, &value, &isnull))
{
......
......@@ -372,12 +372,8 @@ Datum pgis_union_geometry_array(PG_FUNCTION_ARGS)
if ( nelems == 0 ) PG_RETURN_NULL();
/* Quick scan for nulls */
#if POSTGIS_PGSQL_VERSION >= 95
iterator = array_create_iterator(array, 0, NULL);
#else
iterator = array_create_iterator(array, 0);
#endif
while( array_iterate(iterator, &value, &isnull) )
while (array_iterate(iterator, &value, &isnull))
{
/* Skip null array items */
if (isnull) continue;
......@@ -412,12 +408,8 @@ Datum pgis_union_geometry_array(PG_FUNCTION_ARGS)
** We need to convert the array of GSERIALIZED into a GEOS collection.
** First make an array of GEOS geometries.
*/
#if POSTGIS_PGSQL_VERSION >= 95
iterator = array_create_iterator(array, 0, NULL);
#else
iterator = array_create_iterator(array, 0);
#endif
while( array_iterate(iterator, &value, &isnull) )
while (array_iterate(iterator, &value, &isnull))
{
GSERIALIZED *gser_in;
......@@ -2673,19 +2665,11 @@ uint32_t array_nelems_not_null(ArrayType* array) {
Datum value;
bool isnull;
uint32_t nelems_not_null = 0;
#if POSTGIS_PGSQL_VERSION >= 95
iterator = array_create_iterator(array, 0, NULL);
#else
iterator = array_create_iterator(array, 0);
#endif
while(array_iterate(iterator, &value, &isnull) )
{
if (!isnull)
{
nelems_not_null++;
}
}
array_free_iterator(iterator);
return nelems_not_null;
......@@ -2702,42 +2686,36 @@ LWGEOM** ARRAY2LWGEOM(ArrayType* array, uint32_t nelems, int* is3d, int* srid)
LWGEOM** lw_geoms = palloc(nelems * sizeof(LWGEOM*));
#if POSTGIS_PGSQL_VERSION >= 95
iterator = array_create_iterator(array, 0, NULL);
#else
iterator = array_create_iterator(array, 0);
#endif
while(array_iterate(iterator, &value, &isnull))
{
GSERIALIZED *geom = (GSERIALIZED*) DatumGetPointer(value);
if (isnull)
{
continue;
}
*is3d = *is3d || gserialized_has_z(geom);
lw_geoms[i] = lwgeom_from_gserialized(geom);
if (!lw_geoms[i]) /* error in creation */
{
lwpgerror("Geometry deserializing geometry");
return NULL;
}
if (!gotsrid)
{
gotsrid = true;
*srid = gserialized_get_srid(geom);
}
else if (*srid != gserialized_get_srid(geom))
{
error_if_srid_mismatch(*srid, gserialized_get_srid(geom));
return NULL;
}
i++;
}
while (array_iterate(iterator, &value, &isnull))
{
GSERIALIZED *geom = (GSERIALIZED *)DatumGetPointer(value);
if (isnull)
continue;
*is3d = *is3d || gserialized_has_z(geom);
lw_geoms[i] = lwgeom_from_gserialized(geom);
if (!lw_geoms[i]) /* error in creation */
{
lwpgerror("Geometry deserializing geometry");
return NULL;
}
if (!gotsrid)
{
gotsrid = true;
*srid = gserialized_get_srid(geom);
}
else if (*srid != gserialized_get_srid(geom))
{
error_if_srid_mismatch(*srid, gserialized_get_srid(geom));
return NULL;
}
i++;
}
return lw_geoms;
}
......@@ -2753,20 +2731,14 @@ GEOSGeometry** ARRAY2GEOS(ArrayType* array, uint32_t nelems, int* is3d, int* sri
GEOSGeometry** geos_geoms = palloc(nelems * sizeof(GEOSGeometry*));
#if POSTGIS_PGSQL_VERSION >= 95
iterator = array_create_iterator(array, 0, NULL);
#else
iterator = array_create_iterator(array, 0);
#endif
while(array_iterate(iterator, &value, &isnull))
{
GSERIALIZED *geom = (GSERIALIZED*) DatumGetPointer(value);
if (isnull)
{
continue;
}
*is3d = *is3d || gserialized_has_z(geom);
......
......@@ -560,13 +560,8 @@ Datum TWKBFromLWGEOMArray(PG_FUNCTION_ARGS)
/* Loop through array and build a collection of geometry and */
/* a simple array of ids. If either side is NULL, skip it */
#if POSTGIS_PGSQL_VERSION >= 95
iter_geoms = array_create_iterator(arr_geoms, 0, NULL);
iter_ids = array_create_iterator(arr_ids, 0, NULL);
#else
iter_geoms = array_create_iterator(arr_geoms, 0);
iter_ids = array_create_iterator(arr_ids, 0);
#endif
while( array_iterate(iter_geoms, &val_geom, &null_geom) &&
array_iterate(iter_ids, &val_id, &null_id) )
......
......@@ -28,10 +28,7 @@
#include "pgsql_compat.h"
#ifdef HAVE_LIBPROTOBUF
#if POSTGIS_PGSQL_VERSION >= 94
#include "utils/jsonb.h"
#endif
#if POSTGIS_PGSQL_VERSION < 110
/* See trac ticket #3867 */
......@@ -339,13 +336,12 @@ static void parse_column_keys(mvt_agg_context *ctx)
char *tkey = TupleDescAttr(ctx->column_cache.tupdesc, i)->attname.data;
ctx->column_cache.column_oid[i] = typoid;
#if POSTGIS_PGSQL_VERSION >= 94
if (typoid == JSONBOID)
{
ctx->column_cache.column_keys_index[i] = UINT32_MAX;
continue;
}
#endif
if (ctx->geom_name == NULL)
{
......@@ -726,7 +722,6 @@ static void parse_values(mvt_agg_context *ctx)
k = cc.column_keys_index[i];
typoid = cc.column_oid[i];
#if POSTGIS_PGSQL_VERSION >= 94
if (k == UINT32_MAX && typoid != JSONBOID)
elog(ERROR, "parse_values: unexpectedly could not find parsed key name '%s'", key);
if (typoid == JSONBOID)
......@@ -734,10 +729,6 @@ static void parse_values(mvt_agg_context *ctx)
tags = parse_jsonb(ctx, DatumGetJsonbP(datum), tags);
continue;
}
#else
if (k == UINT32_MAX)
elog(ERROR, "parse_values: unexpectedly could not find parsed key name '%s'", key);
#endif
switch (typoid)
{
......
......@@ -578,11 +578,7 @@ CREATE OPERATOR ~= (
-- Availability: 2.0.0
CREATE OR REPLACE FUNCTION geometry_distance_centroid(geom1 geometry, geom2 geometry)
RETURNS float8
#if POSTGIS_PGSQL_VERSION >= 95
AS 'MODULE_PATHNAME', 'ST_Distance'
#else
AS 'MODULE_PATHNAME', 'gserialized_distance_centroid_2d'
#endif
LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL;
-- Availability: 2.0.0
......
......@@ -736,19 +736,21 @@ Datum RASTER_bandmetadata(PG_FUNCTION_ARGS)
nulls[5] = TRUE;
}
if (bmd2[call_cntr].filesize) {
if (bmd2[call_cntr].filesize)
{
#if POSTGIS_PGSQL_VERSION > 95
values[6] = UInt64GetDatum(bmd2[call_cntr].filesize);
values[7] = UInt64GetDatum(bmd2[call_cntr].timestamp);
values[6] = UInt64GetDatum(bmd2[call_cntr].filesize);
values[7] = UInt64GetDatum(bmd2[call_cntr].timestamp);
#else /* POSTGIS_PGSQL_VERSION <= 95 */
values[6] = Int64GetDatum(bmd2[call_cntr].filesize);
values[7] = Int64GetDatum(bmd2[call_cntr].timestamp);
values[6] = Int64GetDatum(bmd2[call_cntr].filesize);
values[7] = Int64GetDatum(bmd2[call_cntr].timestamp);
#endif
}
else {
nulls[6] = TRUE;
nulls[7] = TRUE;
}
}
else
{
nulls[6] = TRUE;
nulls[7] = TRUE;
}
/* build a tuple */
tuple = heap_form_tuple(tupdesc, values, nulls);
......
......@@ -37,10 +37,7 @@
#include "../../postgis_config.h"
#if POSTGIS_PGSQL_VERSION > 92
#include "access/htup_details.h" /* for heap_form_tuple() */
#endif
#include "lwgeom_pg.h"
#include "rtpostgis.h"
......
......@@ -5754,11 +5754,7 @@ Datum RASTER_mapAlgebraFctNgb(PG_FUNCTION_ARGS)
}
/* prep function call data */
#if POSTGIS_PGSQL_VERSION <= 90
InitFunctionCallInfoData(cbdata, &cbinfo, 3, InvalidOid, NULL);
#else
InitFunctionCallInfoData(cbdata, &cbinfo, 3, InvalidOid, NULL, NULL);
#endif
memset(cbdata.argnull, FALSE, sizeof(bool) * 3);
/* check that the function isn't strict if the args are null. */
......@@ -6861,11 +6857,7 @@ Datum RASTER_mapAlgebra2(PG_FUNCTION_ARGS)
}
/* prep function call data */
#if POSTGIS_PGSQL_VERSION <= 90
InitFunctionCallInfoData(ufc_info, &ufl_info, ufl_info.fn_nargs, InvalidOid, NULL);
#else
InitFunctionCallInfoData(ufc_info, &ufl_info, ufl_info.fn_nargs, InvalidOid, NULL, NULL);
#endif
memset(ufc_info.argnull, FALSE, sizeof(bool) * ufl_info.fn_nargs);
if (ufl_info.fn_nargs != 4)
......
......@@ -23,7 +23,6 @@ POSTGIS_MAJOR_VERSION=@POSTGIS_MAJOR_VERSION@
POSTGIS_MINOR_VERSION=@POSTGIS_MINOR_VERSION@
HAVE_JSON=@HAVE_JSON@
HAVE_PROTOBUF=@HAVE_PROTOBUF@
HAVE_BRIN=@HAVE_BRIN@
HAVE_SPGIST=@HAVE_SPGIST@
INTERRUPTTESTS=@INTERRUPTTESTS@
......@@ -86,11 +85,13 @@ TESTS = \
forcecurve \
geography \
geometric_median \
hausdorff \
in_geohash \
in_gml \
in_kml \
in_encodedpolyline \
iscollection \
knn_recheck \
legacy \
long_xact \
lwgeom_regress \
......@@ -107,6 +108,7 @@ TESTS = \
quantize_coordinates \
regress \
regress_bdpoly \
regress_buffer_params \
regress_gist_index_nd \
regress_index \
regress_index_nulls \
......@@ -137,43 +139,13 @@ TESTS = \
swapordinates \
summary \
temporal \
temporal_knn \
tickets \
twkb \
typmod \
wkb \
wkt \
wmsservers
ifeq ($(shell expr $(POSTGIS_PGSQL_VERSION) "<" 95),1)
# Index supported KNN only available in PostgreSQL 9.1 and higher
# For 9.5 and higher, use the recheck suite instead
TESTS += knn
endif
ifeq ($(shell expr $(POSTGIS_PGSQL_VERSION) ">=" 95),1)
# Index supported KNN recheck only available in PostgreSQL 9.5 and higher
TESTS += knn_recheck \
temporal_knn
endif
TESTS += \
hausdorff \
regress_buffer_params
ifeq ($(shell expr $(POSTGIS_GEOS_VERSION) ">=" 37),1)
# GEOS-3.7 adds:
# ST_FrechetDistance
TESTS += \
frechet
endif
# GEOS-3.3 adds:
# ST_RelateMatch, ST_IsValidDetail, ST_SharedPaths ,
# ST_Snap, ST_UnaryUnion, ST_MakeClean
TESTS += \
wmsservers \
offsetcurve \
relatematch \
isvaliddetail \
......@@ -182,13 +154,29 @@ TESTS += \
node \
unaryunion \
clean \