From 403e5004315f8fdf9c9f3dfdc82378f2065d84ef Mon Sep 17 00:00:00 2001 From: Paul Ramsey Date: Thu, 13 Sep 2012 20:11:16 +0000 Subject: [PATCH] Remove code in #ifdefs for PgSQL 8.4 and under, per #1880 git-svn-id: http://svn.osgeo.org/postgis/trunk@10281 b70326c6-7e19-0410-871a-916f4a2858ee --- postgis/geometry_estimate.c | 4 ---- postgis/gserialized_gist_2d.c | 2 -- postgis/gserialized_gist_nd.c | 2 -- postgis/lwgeom_accum.c | 23 +++-------------------- 4 files changed, 3 insertions(+), 28 deletions(-) diff --git a/postgis/geometry_estimate.c b/postgis/geometry_estimate.c index b7030946c..17cdf5ef2 100644 --- a/postgis/geometry_estimate.c +++ b/postgis/geometry_estimate.c @@ -242,9 +242,7 @@ Datum geometry_gist_joinsel_2d(PG_FUNCTION_ARGS) if ( ! get_attstatsslot(stats1_tuple, 0, 0, STATISTIC_KIND_GEOMETRY, InvalidOid, NULL, NULL, -#if POSTGIS_PGSQL_VERSION > 84 NULL, -#endif (float4 **)gs1ptr, &geomstats1_nvalues) ) { POSTGIS_DEBUG(3, " STATISTIC_KIND_GEOMETRY stats not found - returning default geometry join selectivity"); @@ -268,9 +266,7 @@ Datum geometry_gist_joinsel_2d(PG_FUNCTION_ARGS) if ( ! get_attstatsslot(stats2_tuple, 0, 0, STATISTIC_KIND_GEOMETRY, InvalidOid, NULL, NULL, -#if POSTGIS_PGSQL_VERSION > 84 NULL, -#endif (float4 **)gs2ptr, &geomstats2_nvalues) ) { POSTGIS_DEBUG(3, " STATISTIC_KIND_GEOMETRY stats not found - returning default geometry join selectivity"); diff --git a/postgis/gserialized_gist_2d.c b/postgis/gserialized_gist_2d.c index ff85b2ab0..39e20a6ba 100644 --- a/postgis/gserialized_gist_2d.c +++ b/postgis/gserialized_gist_2d.c @@ -904,7 +904,6 @@ Datum gserialized_gist_consistent_2d(PG_FUNCTION_ARGS) bool result; BOX2DF query_gbox_index; -#if POSTGIS_PGSQL_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); @@ -913,7 +912,6 @@ Datum gserialized_gist_consistent_2d(PG_FUNCTION_ARGS) out during index scans. For cases when the geometries are large, rechecking can make things twice as slow. */ *recheck = false; -#endif POSTGIS_DEBUG(4, "[GIST] 'consistent' function called"); diff --git a/postgis/gserialized_gist_nd.c b/postgis/gserialized_gist_nd.c index 8d4e4a89d..d01f04b55 100644 --- a/postgis/gserialized_gist_nd.c +++ b/postgis/gserialized_gist_nd.c @@ -698,7 +698,6 @@ Datum gserialized_gist_consistent(PG_FUNCTION_ARGS) char gidxmem[GIDX_MAX_SIZE]; GIDX *query_gbox_index = (GIDX*)gidxmem; -#if POSTGIS_PGSQL_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); @@ -707,7 +706,6 @@ Datum gserialized_gist_consistent(PG_FUNCTION_ARGS) out during index scans. For cases when the geometries are large, rechecking can make things twice as slow. */ *recheck = false; -#endif POSTGIS_DEBUG(4, "[GIST] 'consistent' function called"); diff --git a/postgis/lwgeom_accum.c b/postgis/lwgeom_accum.c index 943e4eb4b..6df1e0a24 100644 --- a/postgis/lwgeom_accum.c +++ b/postgis/lwgeom_accum.c @@ -107,16 +107,8 @@ pgis_geometry_accum_transfn(PG_FUNCTION_ARGS) if (fcinfo->context && IsA(fcinfo->context, AggState)) aggcontext = ((AggState *) fcinfo->context)->aggcontext; -#if POSTGIS_PGSQL_VERSION == 84 - - else if (fcinfo->context && IsA(fcinfo->context, WindowAggState)) - aggcontext = ((WindowAggState *) fcinfo->context)->wincontext; -#endif -#if POSTGIS_PGSQL_VERSION > 84 - else if (fcinfo->context && IsA(fcinfo->context, WindowAggState)) aggcontext = ((WindowAggState *) fcinfo->context)->aggcontext; -#endif else { @@ -162,23 +154,14 @@ pgis_accum_finalfn(pgis_abs *p, MemoryContext mctx, FunctionCallInfo fcinfo) /* cannot be called directly because of internal-type argument */ Assert(fcinfo->context && - (IsA(fcinfo->context, AggState) -#if POSTGIS_PGSQL_VERSION >= 84 - || IsA(fcinfo->context, WindowAggState) -#endif - )); + (IsA(fcinfo->context, AggState) || + IsA(fcinfo->context, WindowAggState)) + ); state = p->a; dims[0] = state->nelems; lbs[0] = 1; -#if POSTGIS_PGSQL_VERSION < 84 - - result = makeMdArrayResult(state, 1, dims, lbs, mctx); -#else - result = makeMdArrayResult(state, 1, dims, lbs, mctx, false); -#endif - return result; } -- 2.40.0