]> granicus.if.org Git - postgis/commitdiff
Remove code in #ifdefs for PgSQL 8.4 and under, per #1880
authorPaul Ramsey <pramsey@cleverelephant.ca>
Thu, 13 Sep 2012 20:11:16 +0000 (20:11 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Thu, 13 Sep 2012 20:11:16 +0000 (20:11 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@10281 b70326c6-7e19-0410-871a-916f4a2858ee

postgis/geometry_estimate.c
postgis/gserialized_gist_2d.c
postgis/gserialized_gist_nd.c
postgis/lwgeom_accum.c

index b7030946cf289e0f2ceb8e5a17ddfb773779cd86..17cdf5ef20bd1a4bc74fc5030f7a5d838b74fc51 100644 (file)
@@ -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");
index ff85b2ab05a80fefe1cb5e6ff817093fcef6cd6e..39e20a6ba97b42e6e72eb83bbb809ea021046ec9 100644 (file)
@@ -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");
 
index 8d4e4a89d4fddafb2f77c196c9eb9cfc6a7696c6..d01f04b55827591c79fd1376283e7af8c3d444a4 100644 (file)
@@ -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");
 
index 943e4eb4b9edb639ca51eaa8b2d6602571e53f6d..6df1e0a2458d4092452ebebc3ba3b3d201b5b898 100644 (file)
@@ -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;
 }