[postgis-tickets] [SCM] PostGIS branch master updated. 3.3.0alpha1-64-g3e748fb20

git at osgeo.org git at osgeo.org
Wed Jun 15 22:14:36 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  3e748fb208f9be706818ee42d53ba805be425cfb (commit)
       via  fea02efdbe512c2679d4e27cdb6ea76095ac478b (commit)
      from  08dcf2aa5f2e0bd9ee195183644d4c3ee8cad6c4 (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 3e748fb208f9be706818ee42d53ba805be425cfb
Author: Regina Obe <lr at pcorp.us>
Date:   Thu Jun 16 01:08:39 2022 -0400

    Get rid of obsolete raster regress makefile. Was replaced by tests.mk a while ago

diff --git a/configure.ac b/configure.ac
index 695077429..86feb8c47 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1537,7 +1537,6 @@ 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/raster/test/regress/Makefile.in b/raster/test/regress/Makefile.in
deleted file mode 100644
index 4cf4dc03e..000000000
--- a/raster/test/regress/Makefile.in
+++ /dev/null
@@ -1,194 +0,0 @@
-#############################################################################
-#
-# 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

commit fea02efdbe512c2679d4e27cdb6ea76095ac478b
Author: Regina Obe <lr at pcorp.us>
Date:   Thu Jun 16 00:52:37 2022 -0400

    Replace -Z option as  optional argument to -Y option.
    Increase default of copy to 50 rows from 11.  References #5170

diff --git a/NEWS b/NEWS
index f4a2690c9..7f8716a29 100644
--- a/NEWS
+++ b/NEWS
@@ -3,8 +3,9 @@ PostGIS 3.3.0dev
 Changes since PostGIS 3.3.0alpha1
 * Enhancements *
   - #5158, pgtopo_import / pgtopo_export manpages (Sandro Santilli)
-  - #5170, add a -Z option to raster2pgsql to
-    control number of rows per copy statement (Regina Obe)
+  - #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)
   - #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/doc/using_raster_dataman.xml b/doc/using_raster_dataman.xml
index 8f6e18ce9..a344468fd 100644
--- a/doc/using_raster_dataman.xml
+++ b/doc/using_raster_dataman.xml
@@ -284,18 +284,11 @@
                  </varlistentry>
 
                <varlistentry>
-                  <term>-Y</term>
+                  <term>-Y  <varname>max_rows_per_copy=50</varname></term>
                   <listitem>
                     <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>
+                      Use copy statements instead of insert statements.  Optionally specify <varname>max_rows_per_copy</varname> statement.
+                      Defaults to 50 when not specified.</para>
                   </listitem>
                 </varlistentry>
 
diff --git a/raster/loader/raster2pgsql.c b/raster/loader/raster2pgsql.c
index 9f95a395e..3c3edd368 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 = 11;
+	config->max_tiles_per_copy = 50;
 }
 
 static void
@@ -2600,12 +2600,17 @@ 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/regress/loader/TiledAutoCopyn.opts b/raster/test/regress/loader/TiledAutoCopyn.opts
new file mode 100644
index 000000000..a3e30dafa
--- /dev/null
+++ b/raster/test/regress/loader/TiledAutoCopyn.opts
@@ -0,0 +1 @@
+-t auto -C -Y 20
diff --git a/raster/test/regress/loader/TiledAutoZCopy.select.expected b/raster/test/regress/loader/TiledAutoCopyn.select.expected
similarity index 100%
rename from raster/test/regress/loader/TiledAutoZCopy.select.expected
rename to raster/test/regress/loader/TiledAutoCopyn.select.expected
diff --git a/raster/test/regress/loader/TiledAutoZCopy.select.sql b/raster/test/regress/loader/TiledAutoCopyn.select.sql
similarity index 100%
rename from raster/test/regress/loader/TiledAutoZCopy.select.sql
rename to raster/test/regress/loader/TiledAutoCopyn.select.sql
diff --git a/raster/test/regress/loader/TiledAutoZCopy.tif.ref b/raster/test/regress/loader/TiledAutoCopyn.tif.ref
similarity index 100%
rename from raster/test/regress/loader/TiledAutoZCopy.tif.ref
rename to raster/test/regress/loader/TiledAutoCopyn.tif.ref
diff --git a/raster/test/regress/loader/TiledAutoZCopy.opts b/raster/test/regress/loader/TiledAutoZCopy.opts
deleted file mode 100644
index c0810c3e4..000000000
--- a/raster/test/regress/loader/TiledAutoZCopy.opts
+++ /dev/null
@@ -1 +0,0 @@
--t auto -C -Y -Z 20
diff --git a/raster/test/regress/loader/TiledAutoZCopy.sql b/raster/test/regress/loader/TiledAutoZCopy.sql
deleted file mode 100644
index 81d831770..000000000
--- a/raster/test/regress/loader/TiledAutoZCopy.sql
+++ /dev/null
@@ -1 +0,0 @@
-select count(*) from loadedrast;
diff --git a/raster/test/regress/tests.mk b/raster/test/regress/tests.mk
index 92676bb42..2c5d006bc 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/TiledAutoZCopy
+	$(topsrcdir)/raster/test/regress/loader/TiledAutoCopyn
 
 RASTER_TESTS := $(RASTER_TEST_FIRST) \
 	$(RASTER_TEST_METADATA) $(RASTER_TEST_IO) $(RASTER_TEST_BASIC_FUNC) \

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

Summary of changes:
 NEWS                                               |   5 +-
 configure.ac                                       |   1 -
 doc/using_raster_dataman.xml                       |  13 +-
 raster/loader/raster2pgsql.c                       |  15 +-
 raster/test/regress/Makefile.in                    | 194 ---------------------
 raster/test/regress/loader/TiledAutoCopyn.opts     |   1 +
 ...ect.expected => TiledAutoCopyn.select.expected} |   0
 ...oZCopy.select.sql => TiledAutoCopyn.select.sql} |   0
 ...ledAutoZCopy.tif.ref => TiledAutoCopyn.tif.ref} |   0
 raster/test/regress/loader/TiledAutoZCopy.opts     |   1 -
 raster/test/regress/loader/TiledAutoZCopy.sql      |   1 -
 raster/test/regress/tests.mk                       |   2 +-
 12 files changed, 18 insertions(+), 215 deletions(-)
 delete mode 100644 raster/test/regress/Makefile.in
 create mode 100644 raster/test/regress/loader/TiledAutoCopyn.opts
 rename raster/test/regress/loader/{TiledAutoZCopy.select.expected => TiledAutoCopyn.select.expected} (100%)
 rename raster/test/regress/loader/{TiledAutoZCopy.select.sql => TiledAutoCopyn.select.sql} (100%)
 rename raster/test/regress/loader/{TiledAutoZCopy.tif.ref => TiledAutoCopyn.tif.ref} (100%)
 delete mode 100644 raster/test/regress/loader/TiledAutoZCopy.opts
 delete mode 100644 raster/test/regress/loader/TiledAutoZCopy.sql


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list