[postgis-tickets] [SCM] PostGIS branch master updated. 3.3.0alpha1-72-ga3afe5ff4

git at osgeo.org git at osgeo.org
Thu Jun 16 07:39:39 PDT 2022


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".

The branch, master has been updated
       via  a3afe5ff4502b172d3edc20421fc6facb01ae814 (commit)
      from  6c5acf038ebf4b3c720d8a2cfdb5991fb9aa78eb (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit a3afe5ff4502b172d3edc20421fc6facb01ae814
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Thu Jun 16 07:39:22 2022 -0700

    Revert "Merge branch 'lbartoletti-fix_cutpaste_isinstdportalcache'"
    
    This reverts commit 6c5acf038ebf4b3c720d8a2cfdb5991fb9aa78eb, reversing
    changes made to 08dcf2aa5f2e0bd9ee195183644d4c3ee8cad6c4.

diff --git a/.github/workflows/msys.yml b/.github/workflows/msys.yml
deleted file mode 100644
index ee705ff0a..000000000
--- a/.github/workflows/msys.yml
+++ /dev/null
@@ -1,53 +0,0 @@
-name: MSYS2
-on: [push, pull_request]
-
-jobs:
-  mingw:
-    name: mingw
-    runs-on: windows-latest
-    strategy:
-      matrix:
-        #fail-fast: false
-        include:
-          # mingw32 fail: addface
-          - { icon: '🟦', sys: mingw64 }
-          - { icon: '🟨', sys: ucrt64  } # Experimental!
-          - { icon: '🟧', sys: clang64 } # Experimental!
-    defaults:
-      run:
-        shell: msys2 {0}
-    steps:
-      # see https://github.com/msys2/setup-msys2
-    - name: checkout
-      uses: actions/checkout at v2
-    - name: '${{ matrix.icon }} Setup MSYS2'
-      uses: msys2/setup-msys2 at v2
-      with:
-        msystem: ${{ matrix.sys }}
-        update: true
-        install: >-
-          git
-          make
-          bison
-        pacboy: >-
-          toolchain:p
-          autotools:p
-          geos:p
-          proj:p
-          gdal:p
-          sfcgal:p
-          json-c:p
-          gettext:p
-          libxml2:p
-          postgresql:p
-
-    - name: '🚧 Build TOOL'
-      run: |
-        MSYSTEM= /${{ matrix.sys }}/bin/initdb -D D:/a/_tmp/psql
-        MSYSTEM= /${{ matrix.sys }}/bin/pg_ctl -D D:/a/_tmp/psql -l logfile start
-        MSYSTEM= /${{ matrix.sys }}/bin/pg_ctl register -N "postgresql" -U "NT AUTHORITY\NetworkService" -D D:/a/_tmp/psql -w -S demand
-        MSYSTEM= /${{ matrix.sys }}/bin/createuser -U `whoami` -s postgres 
-        MSYSTEM= ./autogen.sh
-        MSYSTEM= ./configure --with-pgconfig=/${{ matrix.sys }}/bin/pg_config --without-protobuf
-        MSYSTEM= make
-        MSYSTEM= make check
diff --git a/NEWS b/NEWS
index 7f8716a29..f4a2690c9 100644
--- a/NEWS
+++ b/NEWS
@@ -3,9 +3,8 @@ PostGIS 3.3.0dev
 Changes since PostGIS 3.3.0alpha1
 * Enhancements *
   - #5158, pgtopo_import / pgtopo_export manpages (Sandro Santilli)
-  - #5170, add a optional max_rows_per_copy to -Y option to raster2pgsql to
-    control number of rows per copy statement.
-    Default to 50 when not specified (Regina Obe)
+  - #5170, add a -Z option to raster2pgsql to
+    control number of rows per copy statement (Regina Obe)
   - #4939, #5161, ST_LineMerge now has option to keep the directions of input linestrings,
     useful when processing road graphs. Requires GEOS 3.11. (Sergei Shoulbakov)
   - #5039, postgis_tiger_geocoder TIGER 2021 (Regina Obe)
diff --git a/configure.ac b/configure.ac
index 86feb8c47..695077429 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1537,6 +1537,7 @@ if test "x$with_raster" != "xno"; then
 		raster/loader/Makefile \
 		raster/test/Makefile \
 		raster/test/cunit/Makefile \
+		raster/test/regress/Makefile \
 		raster/scripts/Makefile \
 		raster/scripts/python/Makefile"
 
diff --git a/doc/using_raster_dataman.xml b/doc/using_raster_dataman.xml
index a344468fd..8f6e18ce9 100644
--- a/doc/using_raster_dataman.xml
+++ b/doc/using_raster_dataman.xml
@@ -284,11 +284,18 @@
                  </varlistentry>
 
                <varlistentry>
-                  <term>-Y  <varname>max_rows_per_copy=50</varname></term>
+                  <term>-Y</term>
                   <listitem>
                     <para>
-                      Use copy statements instead of insert statements.  Optionally specify <varname>max_rows_per_copy</varname> statement.
-                      Defaults to 50 when not specified.</para>
+                      Use copy statements instead of insert statements.</para>
+                  </listitem>
+                </varlistentry>
+
+                <varlistentry>
+                  <term>-Z <varname>max_rows_per_copy</varname></term>
+                  <listitem>
+                    <para>
+                      Specify max number of rows per copy statement. Only relevant when combined with -Y.</para>
                   </listitem>
                 </varlistentry>
 
diff --git a/extensions/address_standardizer/std_pg_hash.c b/extensions/address_standardizer/std_pg_hash.c
index f98ae4e9b..06907af0f 100644
--- a/extensions/address_standardizer/std_pg_hash.c
+++ b/extensions/address_standardizer/std_pg_hash.c
@@ -226,8 +226,8 @@ IsInStdPortalCache(StdPortalCache *STDCache,  char *lextab, char *gaztab, char *
     for (i=0; i<STD_CACHE_ITEMS; i++) {
         StdCacheItem *ci = &STDCache->StdCache[i];
         if (ci->lextab && !strcmp(ci->lextab, lextab) &&
-            ci->gaztab && !strcmp(ci->gaztab, gaztab) &&
-            ci->rultab && !strcmp(ci->rultab, rultab))
+            ci->lextab && !strcmp(ci->gaztab, gaztab) &&
+            ci->lextab && !strcmp(ci->rultab, rultab))
                 return TRUE;
     }
 
diff --git a/raster/loader/raster2pgsql.c b/raster/loader/raster2pgsql.c
index 3c3edd368..9f95a395e 100644
--- a/raster/loader/raster2pgsql.c
+++ b/raster/loader/raster2pgsql.c
@@ -704,7 +704,7 @@ init_config(RTLOADERCFG *config) {
 	config->version = 0;
 	config->transaction = 1;
 	config->copy_statements = 0;
-	config->max_tiles_per_copy = 50;
+	config->max_tiles_per_copy = 11;
 }
 
 static void
@@ -2600,17 +2600,12 @@ main(int argc, char **argv) {
 		/* COPY statements */
 		else if (CSEQUAL(argv[argit], "-Y")) {
 			config->copy_statements = 1;
-			/* max tiles per copy */
-			if ( argit < argc - 1) {
-				optarg = argv[argit + 1];
-				if (atoi(optarg) > 0 ) {
-					config->max_tiles_per_copy = atoi(optarg);
-					++argit;
-				}
-			}
 		}
 
-
+		/* max tiles per copy */
+		else if (CSEQUAL(argv[argit], "-Z") && argit < argc - 1) {
+			config->max_tiles_per_copy = atoi(argv[++argit]);
+		}
 		/* GDAL formats */
 		else if (CSEQUAL(argv[argit], "-G")) {
 			uint32_t drv_count = 0;
diff --git a/raster/test/Makefile.in b/raster/test/Makefile.in
index fd0ae4021..033cde4e0 100644
--- a/raster/test/Makefile.in
+++ b/raster/test/Makefile.in
@@ -23,6 +23,7 @@ check-regress:
 
 clean:
 	$(MAKE) -C cunit $@
+	$(MAKE) -C regress $@
 
 distclean: clean
 	$(MAKE) -C cunit $@
diff --git a/raster/test/regress/Makefile.in b/raster/test/regress/Makefile.in
new file mode 100644
index 000000000..4cf4dc03e
--- /dev/null
+++ b/raster/test/regress/Makefile.in
@@ -0,0 +1,194 @@
+#############################################################################
+#
+# Copyright (c) 2009-2022 Sandro Santilli <strk at kbt.io>
+# Copyright (c) 2009 Pierre Racine <pierre.racine at sbf.ulaval.ca>
+# Copyright (c) 2011 Jorge Arevalo <jorge.arevalo at deimos-space.com>
+# Copyright (c) 2011-2013 Regents of the University of California
+#   <bkpark at ucdavis.edu>
+#
+# This is free software; you can redistribute and/or modify it under
+# the terms of the GNU General Public Licence. See the COPYING file.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+#############################################################################
+
+top_srcdir = @top_srcdir@
+srcdir = @srcdir@
+top_builddir = @top_builddir@
+
+POSTGIS_SRC=../../..
+PERL=@PERL@
+
+# MingW hack: rather than use PGSQL_BINDIR directly, we change
+# to the directory and then use "pwd" to return the path. This
+# ensures that the returned path is in MSYS format, otherwise
+# colons in drive letters will break PATH.
+PGSQL_BINDIR=$(shell cd "@PGSQL_BINDIR@" && pwd)
+
+# Where we put our regression installation
+REGRESS_INSTALLDIR = $(realpath $(top_builddir) )/regress/00-regress-install
+
+#
+# Put path from pg_config into front of search path
+#
+PATH := $(PGSQL_BINDIR):$(PATH)
+export PATH
+
+TEST_FIRST = \
+	check_gdal \
+	load_outdb
+
+TEST_LAST = \
+	clean
+
+TEST_METADATA = \
+	check_raster_columns \
+	check_raster_overviews
+
+TEST_IO = \
+	rt_io
+
+TEST_BASIC_FUNC = \
+	rt_bytea \
+	rt_wkb \
+	box3d \
+	rt_addband \
+	rt_band \
+	rt_tile
+
+TEST_PROPS = \
+	rt_dimensions \
+	rt_scale \
+	rt_pixelsize \
+	rt_upperleft \
+	rt_rotation \
+	rt_georeference \
+	rt_set_properties \
+	rt_isempty \
+	rt_hasnoband \
+	rt_metadata \
+	rt_rastertoworldcoord \
+	rt_worldtorastercoord \
+	rt_convexhull \
+	rt_envelope
+
+TEST_BANDPROPS = \
+	rt_band_properties \
+	rt_set_band_properties \
+	rt_pixelaspolygons \
+	rt_pixelaspoints \
+	rt_pixelascentroids \
+	rt_setvalues_array \
+	rt_summarystats \
+	rt_count \
+	rt_histogram \
+	rt_quantile \
+	rt_valuecount \
+	rt_valuepercent \
+	rt_bandmetadata \
+	rt_pixelvalue \
+	rt_neighborhood \
+	rt_nearestvalue \
+	rt_pixelofvalue \
+	rt_polygon \
+	rt_setbandpath
+
+TEST_UTILITY = \
+	rt_utility \
+	rt_fromgdalraster \
+	rt_asgdalraster \
+	rt_astiff \
+	rt_asjpeg \
+	rt_aspng \
+	rt_reclass \
+	rt_gdalwarp \
+	rt_asraster \
+	rt_dumpvalues \
+	rt_makeemptycoverage \
+	rt_createoverview
+
+TEST_MAPALGEBRA = \
+	rt_mapalgebraexpr \
+	rt_mapalgebrafct \
+	rt_mapalgebraexpr_2raster \
+	rt_mapalgebrafct_2raster \
+	rt_mapalgebrafctngb \
+	rt_mapalgebrafctngb_userfunc \
+	rt_intersection \
+	rt_clip \
+	rt_mapalgebra \
+	rt_mapalgebra_expr \
+	rt_mapalgebra_mask \
+	rt_union \
+	rt_invdistweight4ma \
+	rt_4ma \
+	rt_setvalues_geomval \
+	rt_elevation_functions \
+	rt_colormap \
+	rt_grayscale
+
+TEST_SREL = \
+	rt_gist_relationships \
+	rt_intersects \
+	rt_samealignment \
+	rt_geos_relationships \
+	rt_iscoveragetile
+
+TEST_BUGS = \
+	bug_test_car5 \
+	permitted_gdal_drivers \
+	tickets
+
+TEST_LOADER = \
+	loader/Basic \
+	loader/Projected \
+	loader/BasicCopy \
+	loader/BasicFilename \
+	loader/BasicOutDB \
+	loader/Tiled10x10 \
+	loader/Tiled10x10Copy \
+	loader/Tiled8x8 \
+	loader/TiledAuto \
+	loader/TiledAutoSkipNoData \
+	loader/TiledAutoZCopy
+
+RASTER_TESTS := $(TEST_FIRST) \
+	$(TEST_METADATA) $(TEST_IO) $(TEST_BASIC_FUNC) \
+	$(TEST_PROPS) $(TEST_BANDPROPS) \
+	$(TEST_UTILITY) $(TEST_MAPALGEBRA) $(TEST_SREL) \
+	$(TEST_BUGS) \
+	$(TEST_LOADER) \
+	$(TEST_LAST)
+
+all:
+	@echo "Use 'make check' to run all tests"
+
+distclean: clean
+	rm -f Makefile
+
+clean:
+	$(RM) -f rtpostgis.sql
+
+rtpostgis.sql: ../../rt_pg/rtpostgis.sql
+	$(PERL) -lpe "s'\\\$$libdir'$(REGRESS_INSTALLDIR)/lib'g" $< > $@
+
+
+# TODO: drop this variable, use top_srcdir directly
+topsrcdir = $(top_srcdir)
+
+include $(srcdir)/tests.mk
+include $(top_srcdir)/regress/runtest.mk
+
+check: check-regress
diff --git a/raster/test/regress/loader/TiledAutoCopyn.opts b/raster/test/regress/loader/TiledAutoCopyn.opts
deleted file mode 100644
index a3e30dafa..000000000
--- a/raster/test/regress/loader/TiledAutoCopyn.opts
+++ /dev/null
@@ -1 +0,0 @@
--t auto -C -Y 20
diff --git a/raster/test/regress/loader/TiledAutoZCopy.opts b/raster/test/regress/loader/TiledAutoZCopy.opts
new file mode 100644
index 000000000..c0810c3e4
--- /dev/null
+++ b/raster/test/regress/loader/TiledAutoZCopy.opts
@@ -0,0 +1 @@
+-t auto -C -Y -Z 20
diff --git a/raster/test/regress/loader/TiledAutoCopyn.select.expected b/raster/test/regress/loader/TiledAutoZCopy.select.expected
similarity index 100%
rename from raster/test/regress/loader/TiledAutoCopyn.select.expected
rename to raster/test/regress/loader/TiledAutoZCopy.select.expected
diff --git a/raster/test/regress/loader/TiledAutoCopyn.select.sql b/raster/test/regress/loader/TiledAutoZCopy.select.sql
similarity index 100%
copy from raster/test/regress/loader/TiledAutoCopyn.select.sql
copy to raster/test/regress/loader/TiledAutoZCopy.select.sql
diff --git a/raster/test/regress/loader/TiledAutoCopyn.select.sql b/raster/test/regress/loader/TiledAutoZCopy.sql
similarity index 100%
rename from raster/test/regress/loader/TiledAutoCopyn.select.sql
rename to raster/test/regress/loader/TiledAutoZCopy.sql
diff --git a/raster/test/regress/loader/TiledAutoCopyn.tif.ref b/raster/test/regress/loader/TiledAutoZCopy.tif.ref
similarity index 100%
rename from raster/test/regress/loader/TiledAutoCopyn.tif.ref
rename to raster/test/regress/loader/TiledAutoZCopy.tif.ref
diff --git a/raster/test/regress/tests.mk b/raster/test/regress/tests.mk
index 2c5d006bc..92676bb42 100644
--- a/raster/test/regress/tests.mk
+++ b/raster/test/regress/tests.mk
@@ -134,7 +134,7 @@ RASTER_TEST_LOADER = \
 	$(topsrcdir)/raster/test/regress/loader/Tiled8x8 \
 	$(topsrcdir)/raster/test/regress/loader/TiledAuto \
 	$(topsrcdir)/raster/test/regress/loader/TiledAutoSkipNoData \
-	$(topsrcdir)/raster/test/regress/loader/TiledAutoCopyn
+	$(topsrcdir)/raster/test/regress/loader/TiledAutoZCopy
 
 RASTER_TESTS := $(RASTER_TEST_FIRST) \
 	$(RASTER_TEST_METADATA) $(RASTER_TEST_IO) $(RASTER_TEST_BASIC_FUNC) \

-----------------------------------------------------------------------

Summary of changes:
 .github/workflows/msys.yml                         |  53 ------
 NEWS                                               |   5 +-
 configure.ac                                       |   1 +
 doc/using_raster_dataman.xml                       |  13 +-
 extensions/address_standardizer/std_pg_hash.c      |   4 +-
 raster/loader/raster2pgsql.c                       |  15 +-
 raster/test/Makefile.in                            |   1 +
 raster/test/regress/Makefile.in                    | 194 +++++++++++++++++++++
 raster/test/regress/loader/TiledAutoCopyn.opts     |   1 -
 raster/test/regress/loader/TiledAutoZCopy.opts     |   1 +
 ...ect.expected => TiledAutoZCopy.select.expected} |   0
 ...oCopyn.select.sql => TiledAutoZCopy.select.sql} |   0
 .../{TiledAuto.select.sql => TiledAutoZCopy.sql}   |   0
 ...ledAutoCopyn.tif.ref => TiledAutoZCopy.tif.ref} |   0
 raster/test/regress/tests.mk                       |   2 +-
 15 files changed, 217 insertions(+), 73 deletions(-)
 delete mode 100644 .github/workflows/msys.yml
 create mode 100644 raster/test/regress/Makefile.in
 delete mode 100644 raster/test/regress/loader/TiledAutoCopyn.opts
 create mode 100644 raster/test/regress/loader/TiledAutoZCopy.opts
 rename raster/test/regress/loader/{TiledAutoCopyn.select.expected => TiledAutoZCopy.select.expected} (100%)
 rename raster/test/regress/loader/{TiledAutoCopyn.select.sql => TiledAutoZCopy.select.sql} (100%)
 copy raster/test/regress/loader/{TiledAuto.select.sql => TiledAutoZCopy.sql} (100%)
 rename raster/test/regress/loader/{TiledAutoCopyn.tif.ref => TiledAutoZCopy.tif.ref} (100%)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list