]> granicus.if.org Git - postgis/commitdiff
Get rid of all if def needed for versions of PostgreSQL lower than 9.3 and GEOS 3.3
authorRegina Obe <lr@pcorp.us>
Fri, 26 May 2017 04:03:17 +0000 (04:03 +0000)
committerRegina Obe <lr@pcorp.us>
Fri, 26 May 2017 04:03:17 +0000 (04:03 +0000)
Document dropping support for PostgreSQL 9.2
Note didn't change postgis/gserialized_estimate.c which also has an ifdef (leaving that for pramsey)
References #3761 for PostGIS 2.4

git-svn-id: http://svn.osgeo.org/postgis/trunk@15402 b70326c6-7e19-0410-871a-916f4a2858ee

20 files changed:
configure.ac
doc/extras_tigergeocoder.xml
doc/postgis.xml
postgis/Makefile.in
postgis/lwgeom_accum.c
postgis/lwgeom_backend_api.c
postgis/lwgeom_dumppoints.c
postgis/lwgeom_functions_analytic.c
postgis/lwgeom_geos.c
postgis/lwgeom_inout.c
postgis/postgis.sql.in
postgis/postgis_module.c
raster/rt_pg/rtpg_band_properties.c
raster/rt_pg/rtpg_gdal.c
raster/rt_pg/rtpg_mapalgebra.c
raster/rt_pg/rtpg_pixel.c
raster/rt_pg/rtpg_raster_properties.c
raster/rt_pg/rtpg_statistics.c
raster/rt_pg/rtpostgis.c
regress/Makefile.in

index 661ca6be6a10024ebd1506568daaff9206e6ce3c..2e8ff10a74417e2d591f6e038e6e0321790c46b0 100644 (file)
@@ -455,9 +455,9 @@ if test "x$LIBLWGEOM_ONLY" = "xno"; then
   PGSQL_SHAREDIR=`"$PG_CONFIG" --sharedir`
 
   AC_MSG_RESULT([checking PostgreSQL version... $PGSQL_FULL_VERSION])
-  dnl Ensure that we are using PostgreSQL >= 9.2
-  if test $POSTGIS_PGSQL_VERSION -lt 92; then
-    AC_MSG_ERROR([PostGIS requires PostgreSQL >= 9.2])
+  dnl Ensure that we are using PostgreSQL >= 9.3
+  if test $POSTGIS_PGSQL_VERSION -lt 93; then
+    AC_MSG_ERROR([PostGIS requires PostgreSQL >= 9.3])
   fi
 
   HAVE_BRIN=no
index 75044ebced97260845cf71c1802bd75bce01b287..3d8675287446ab06e57e32354ffbe7ccce028366 100644 (file)
@@ -966,6 +966,13 @@ CREATE INDEX idx_tiger_data_ma_faces_countyfp ON tiger_data.ma_faces USING btree
           <listitem>
             <para><varname>parsed</varname> boolean - denotes if addess was formed from normalize process. The normalize_address function sets this to true before returning the address.</para>
           </listitem>
+          
+          <listitem>
+            <para><varname>zip4</varname> last 4 digits of a 9 digit zip code. Availability: PostGIS 2.4.0.</para>
+          </listitem>
+          <listitem>
+            <para><varname>address_alphanumeric</varname> Full street number even if it has alpha characters like 17R. Parsing of this is better using <xref linkend="Pagc_Normalize_Address" /> function.  Availability: PostGIS 2.4.0.</para>
+          </listitem>
         </orderedlist>
 
       </refsection>
@@ -999,7 +1006,7 @@ CREATE INDEX idx_tiger_data_ma_faces_countyfp ON tiger_data.ma_faces USING btree
       </refsection>
     </refentry>
 
-        <refentry id="Pagc_Normalize_Address">
+    <refentry id="Pagc_Normalize_Address">
       <refnamediv>
         <refname>Pagc_Normalize_Address</refname>
 
@@ -1063,6 +1070,12 @@ CREATE INDEX idx_tiger_data_ma_faces_countyfp ON tiger_data.ma_faces USING btree
           <listitem>
             <para><varname>parsed</varname> boolean - denotes if addess was formed from normalize process. The normalize_address function sets this to true before returning the address.</para>
           </listitem>
+          <listitem>
+            <para><varname>zip4</varname> last 4 digits of a 9 digit zip code. Availability PostGIS 2.4.0.</para>
+          </listitem>
+          <listitem>
+            <para><varname>address_alphanumeric</varname> Full street number even if it has alpha characters like 17R or 12 1/2.  Availability PostGIS 2.4.0.</para>
+          </listitem>
         </orderedlist>
 
       </refsection>
index 5a2be9179104e7bcdd682398a37096096f88cbd6..6208ab0da197dbe898997205b71fe558518b799f 100644 (file)
@@ -4,7 +4,7 @@
 
 <!-- This value is automatically generated by the Makefile -->
 <!ENTITY last_release_version "@@LAST_RELEASE_VERSION@@">
-<!ENTITY last_minor_version "2.2">
+<!ENTITY last_minor_version "2.3">
 
 <!-- ONCE Tagged, this need to change to http://download.osgeo.org/postgis/source/postgis-@@LAST_RELEASE_VERSION@@.tar.gz -->
 <!-- In dev should be, this need to change to http://postgis.net/stuff/postgis-@@LAST_RELEASE_VERSION@@.tar.gz -->
@@ -12,8 +12,8 @@
 
 <!-- Change these values to update the version numbers referenced within the documentation -->
 <!ENTITY last_proj_release_version "4.8.0">
-<!ENTITY last_geos_release_version "3.4.0">
-<!ENTITY min_postgres_version "9.2">
+<!ENTITY last_geos_release_version "3.6.2">
+<!ENTITY min_postgres_version "9.3">
 
 <!ENTITY introduction SYSTEM "introduction.xml">
 <!ENTITY installation SYSTEM "installation.xml">
index ee25399d276fdf4d1011e77be17149ffb008ea0e..12b102157fc908cbb7f171f0b221ce4034ff8e1d 100644 (file)
@@ -160,10 +160,10 @@ SHLIB_LINK := $(SHLIB_LINK_F) $(SHLIB_LINK)
 # so that no prefix is included. This allows us to relocate to a temporary
 # directory for regression testing.
 ifeq ($(REGRESS),1)
-        bindir=/bin
-        pkglibdir=/lib
-        datadir=/share
-        datamoduledir=contrib/postgis
+       bindir=/bin
+       pkglibdir=/lib
+       datadir=/share
+       datamoduledir=contrib/postgis
 endif
 
 # Make all PostGIS objects depend upon liblwgeom, so that if an underlying
index 951c51a5941cba2994dbe362ecc1bdd9a674a19b..8ebba7e7a41f4b30a0eabb6cd8dda0da85e555f1 100644 (file)
@@ -386,13 +386,9 @@ PGISDirectFunctionCall1(PGFunction func, Datum arg1)
        FunctionCallInfoData fcinfo;
        Datum           result;
 
-#if POSTGIS_PGSQL_VERSION > 90
 
        InitFunctionCallInfoData(fcinfo, NULL, 1, InvalidOid, NULL, NULL);
-#else
 
-       InitFunctionCallInfoData(fcinfo, NULL, 1, NULL, NULL);
-#endif
 
        fcinfo.arg[0] = arg1;
        fcinfo.argnull[0] = false;
index 2f4ed44418ae75564c78252899685a9892f16583..48adeea1ba361693e59f141ed58ebc5c56087414 100644 (file)
@@ -146,9 +146,7 @@ void lwgeom_init_backend()
                                (char *)lwgeom_backends[0].name, /* bootValue */
                                PGC_USERSET, /* GucContext context */
                                0, /* int flags */
-#if POSTGIS_PGSQL_VERSION >= 91
                                NULL, /* GucStringCheckHook check_hook */
-#endif
                                lwgeom_backend_switch, /* GucStringAssignHook assign_hook */
                                NULL  /* GucShowHook show_hook */
                                );
index 6a25197834bb60967eeea4b4e5893f3def851f48..43ac19c0e2d363af6d2b01fd026f5f5789ddd414 100644 (file)
@@ -33,9 +33,9 @@
 
 #include "../postgis_config.h"
 #include "lwgeom_pg.h"
-#if POSTGIS_PGSQL_VERSION > 92
+
 #include "access/htup_details.h"
-#endif
+
 
 #include "liblwgeom.h"
 
index 7d4ad951a6d49b08fe0d767c09263d8010cc7af1..40d9cfa8b149a0a04901008fbd99e86307bf526a 100644 (file)
 #include "lwgeom_rtree.h"
 #include "lwgeom_functions_analytic.h"
 
-#if POSTGIS_PGSQL_VERSION >= 93
+
 #include "access/htup_details.h"
-#else
-#include "access/htup.h"
-#endif
 
 /***********************************************************************
  * Simple Douglas-Peucker line simplification.
index e7f30a7c445a19640882210f15ae331877e5ac2c..7f36668b96fdfc77a2decfe05c18894c57f06f49 100644 (file)
 #include "utils/lsyscache.h"
 #include "utils/numeric.h"
 
-#if POSTGIS_PGSQL_VERSION >= 93
 #include "access/htup_details.h"
-#else
-#include "access/htup.h"
-#endif
+
 
 /* PostGIS */
 #include "lwgeom_functions_analytic.h" /* for point_in_polygon */
index 61ad79f347412080fbb6bde8e3d45e7f3611a20f..f87096c6821f6f1eef24851c63834c3f206696d9 100644 (file)
@@ -49,9 +49,9 @@
 #include "geography.h" /* for lwgeom_valid_typmod */
 #include "lwgeom_transform.h"
 
-#if POSTGIS_PGSQL_VERSION > 92
+
 #include "access/htup_details.h"
-#endif
+
 
 void elog_ERROR(const char* string);
 
index ff2a87db364d4c8ab921727d0d6b980a4bb06a0c..67c53dfdebdd475d2c493e80131a96a6eaba7881 100644 (file)
@@ -732,11 +732,9 @@ CREATE OPERATOR CLASS gist_geometry_ops_2d
        OPERATOR        10       <<| ,
        OPERATOR        11       |>> ,
        OPERATOR        12       |&> ,
-#if POSTGIS_PGSQL_VERSION >= 91
        OPERATOR        13       <-> FOR ORDER BY pg_catalog.float_ops,
        OPERATOR        14       <#> FOR ORDER BY pg_catalog.float_ops,
        FUNCTION        8        geometry_gist_distance_2d (internal, geometry, int4),
-#endif
        FUNCTION        1        geometry_gist_consistent_2d (internal, geometry, int4),
        FUNCTION        2        geometry_gist_union_2d (bytea, internal),
        FUNCTION        3        geometry_gist_compress_2d (internal),
@@ -860,7 +858,6 @@ CREATE OPERATOR CLASS gist_geometry_ops_nd
 --     OPERATOR        6        ~=     ,
 --     OPERATOR        7        ~      ,
 --     OPERATOR        8        @      ,
-#if POSTGIS_PGSQL_VERSION >= 91
        -- Availability: 2.2.0
        OPERATOR        13       <<->> FOR ORDER BY pg_catalog.float_ops,
 #if POSTGIS_PGSQL_VERSION >= 95
@@ -869,7 +866,6 @@ CREATE OPERATOR CLASS gist_geometry_ops_nd
 #endif
        -- Availability: 2.2.0
        FUNCTION        8        geometry_gist_distance_nd (internal, geometry, int4),
-#endif
        FUNCTION        1        geometry_gist_consistent_nd (internal, geometry, int4),
        FUNCTION        2        geometry_gist_union_nd (bytea, internal),
        FUNCTION        3        geometry_gist_compress_nd (internal),
index e107098c7f9a7699350324624adef7c399befb6b..38b3c76ce5764b4e72926903c1255c24042da439 100644 (file)
@@ -79,9 +79,7 @@ _PG_init(void)
     0, /* bootValue */
     PGC_SUSET, /* GucContext context */
     GUC_UNIT_MS, /* int flags */
-#if POSTGIS_PGSQL_VERSION >= 91
     NULL, /* GucStringCheckHook check_hook */
-#endif
     NULL, /* GucStringAssignHook assign_hook */
     NULL  /* GucShowHook show_hook */
    );
@@ -97,9 +95,7 @@ _PG_init(void)
     "Welcome to PostGIS " POSTGIS_VERSION, /* bootValue */
     PGC_SUSET, /* GucContext context */
     GUC_UNIT_MS, /* int flags */
-#if POSTGIS_PGSQL_VERSION >= 91
     NULL, /* GucStringCheckHook check_hook */
-#endif
     NULL, /* GucStringAssignHook assign_hook */
     NULL  /* GucShowHook show_hook */
    );
index cc3bed13ca7b53bd31bd7dd66fbdab9349f4cd8c..d1cb038eae46d08e249fa64f7e8a62e35dc2bed4 100644 (file)
@@ -37,9 +37,9 @@
 
 #include "../../postgis_config.h"
 
-#if POSTGIS_PGSQL_VERSION > 92
+
 #include "access/htup_details.h" /* for heap_form_tuple() */
-#endif
+
 
 #include "rtpostgis.h"
 
index dbe8cdae93272125180f8e1d042bf4f6c2daa752..daaf8cd14ade2b2a00093accd4706908225e0577 100644 (file)
@@ -37,9 +37,9 @@
 
 #include "../../postgis_config.h"
 
-#if POSTGIS_PGSQL_VERSION > 92
+
 #include "access/htup_details.h" /* for heap_form_tuple() */
-#endif
+
 
 #include "rtpostgis.h"
 #include "rtpg_internal.h"
index 43d04fa9ab2a79ac644c7c61b5a84af899f0e5e3..c0c8ca86de704c42448ddb1aa18541db663525ef 100644 (file)
@@ -836,11 +836,8 @@ Datum RASTER_nMapAlgebra(PG_FUNCTION_ARGS)
                        elog(NOTICE, "Function provided is VOLATILE. Unless required and for best performance, function should be IMMUTABLE or STABLE");
 
                /* prep function call data */
-#if POSTGIS_PGSQL_VERSION > 90
                InitFunctionCallInfoData(arg->callback.ufc_info, &(arg->callback.ufl_info), arg->callback.ufl_info.fn_nargs, InvalidOid, NULL, NULL);
-#else
-               InitFunctionCallInfoData(arg->callback.ufc_info, &(arg->callback.ufl_info), arg->callback.ufl_info.fn_nargs, NULL, NULL);
-#endif
+
                memset(arg->callback.ufc_info.argnull, FALSE, sizeof(bool) * arg->callback.ufl_info.fn_nargs);
 
                /* userargs (7) */
@@ -5330,11 +5327,8 @@ Datum RASTER_mapAlgebraFct(PG_FUNCTION_ARGS)
     }
 
     /* prep function call data */
-#if POSTGIS_PGSQL_VERSION <= 90
-    InitFunctionCallInfoData(cbdata, &cbinfo, 2, InvalidOid, NULL);
-#else
     InitFunctionCallInfoData(cbdata, &cbinfo, 2, InvalidOid, NULL, NULL);
-#endif
+
     memset(cbdata.argnull, FALSE, sizeof(bool) * cbinfo.fn_nargs);
 
     /* check that the function isn't strict if the args are null. */
index 6689f2b471dcbaab127a2a1458f00afbbd527e5b..e22c079a093ecc6eeafba87742f13d84bca9626d 100644 (file)
@@ -38,9 +38,9 @@
 #include "lwgeom_pg.h"
 
 
-#if POSTGIS_PGSQL_VERSION > 92
+
 #include "access/htup_details.h" /* for heap_form_tuple() */
-#endif
+
 
 #include "rtpostgis.h"
 
index 80f0ec2729c22223982946e21e625c63dbfc58d0..3ab8fa45e0aa867287683d3897b91aa69b5bf876 100644 (file)
@@ -33,9 +33,9 @@
 
 #include "../../postgis_config.h"
 
-#if POSTGIS_PGSQL_VERSION > 92
+
 #include "access/htup_details.h" /* for heap_form_tuple() */
-#endif
+
 
 #include "rtpostgis.h"
 
index 95c5095885c18b198cded4a8ac21efdaabb8ec2f..67a4ac651571ed0aad453a407892f9b6bb672f5f 100644 (file)
@@ -39,9 +39,9 @@
 
 #include "../../postgis_config.h"
 
-#if POSTGIS_PGSQL_VERSION > 92
+
 #include "access/htup_details.h" /* for heap_form_tuple() */
-#endif
+
 
 #include "rtpostgis.h"
 
index 215fa6eddcd8b5c392ec9681e08e14b7e4f6e3ac..543764c05df6fdd98314d6d5d1ae52553b0d61fc 100644 (file)
@@ -500,9 +500,7 @@ _PG_init(void) {
                        NULL, /* bootValue */
                        PGC_SUSET, /* GucContext context */
                        0, /* int flags */
-#if POSTGIS_PGSQL_VERSION >= 91
                        NULL, /* GucStringCheckHook check_hook */
-#endif
                        rtpg_assignHookGDALDataPath, /* GucStringAssignHook assign_hook */
                        NULL  /* GucShowHook show_hook */
                );
@@ -525,9 +523,7 @@ _PG_init(void) {
                        boot_postgis_gdal_enabled_drivers, /* bootValue */
                        PGC_SUSET, /* GucContext context */
                        0, /* int flags */
-#if POSTGIS_PGSQL_VERSION >= 91
                        NULL, /* GucStringCheckHook check_hook */
-#endif
                        rtpg_assignHookGDALEnabledDrivers, /* GucStringAssignHook assign_hook */
                        NULL  /* GucShowHook show_hook */
                );
@@ -550,9 +546,7 @@ _PG_init(void) {
                        boot_postgis_enable_outdb_rasters, /* bootValue */
                        PGC_SUSET, /* GucContext context */
                        0, /* int flags */
-#if POSTGIS_PGSQL_VERSION >= 91
                        NULL, /* GucStringCheckHook check_hook */
-#endif
                        rtpg_assignHookEnableOutDBRasters, /* GucBoolAssignHook assign_hook */
                        NULL  /* GucShowHook show_hook */
                );
index 361bd3e403a408d059f54cded1a524db6f8e7538..1fb4fd6a1bfd11ccdf9413f8d88a2dde72dce736 100644 (file)
@@ -145,27 +145,23 @@ TESTS = \
        wkt \
        wmsservers
 
-ifeq ($(shell expr $(POSTGIS_PGSQL_VERSION) ">=" 91),1)
 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
-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
+                       temporal_knn
 endif
 
-ifeq ($(shell expr $(POSTGIS_GEOS_VERSION) ">=" 32),1)
-       # GEOS-3.3 adds:
-       # ST_HausdorffDistance, ST_Buffer(params)
-       TESTS += \
-               hausdorff \
-               regress_buffer_params
-endif
+
+TESTS += \
+       hausdorff \
+       regress_buffer_params
+
 
 ifeq ($(shell expr $(POSTGIS_GEOS_VERSION) ">=" 37),1)
        # GEOS-3.7 adds:
@@ -174,21 +170,21 @@ ifeq ($(shell expr $(POSTGIS_GEOS_VERSION) ">=" 37),1)
                frechet
 endif
 
-ifeq ($(shell expr $(POSTGIS_GEOS_VERSION) ">=" 33),1)
-       # GEOS-3.3 adds:
-       # ST_RelateMatch, ST_IsValidDetail, ST_SharedPaths ,
-       # ST_Snap, ST_UnaryUnion, ST_MakeClean
-       TESTS += \
-               offsetcurve \
-               relatematch \
-               isvaliddetail \
-               sharedpaths \
-               snap \
-               node \
-               unaryunion \
-               clean \
-               relate_bnr
-endif
+
+# GEOS-3.3 adds:
+# ST_RelateMatch, ST_IsValidDetail, ST_SharedPaths ,
+# ST_Snap, ST_UnaryUnion, ST_MakeClean
+TESTS += \
+       offsetcurve \
+       relatematch \
+       isvaliddetail \
+       sharedpaths \
+       snap \
+       node \
+       unaryunion \
+       clean \
+       relate_bnr
+
 
 ifeq ($(shell expr $(POSTGIS_GEOS_VERSION) ">=" 34),1)
        # GEOS-3.4 adds: