[postgis-tickets] [SCM] PostGIS branch master updated. 3.4.0beta1-67-g57c738f80

git at osgeo.org git at osgeo.org
Tue Jul 25 13:12:36 PDT 2023


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  57c738f80fe332520d23869daad1183408ba7dbe (commit)
      from  718917d953ce6dce61ed8c4220bc5537d4feaff6 (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 57c738f80fe332520d23869daad1183408ba7dbe
Author: Sandro Santilli <strk at kbt.io>
Date:   Tue Jul 25 10:58:47 2023 +0200

    Rename postgis_restore.pl to postgis_restore
    
    References #5447

diff --git a/.gitignore b/.gitignore
index 4d852102f..98ffda812 100644
--- a/.gitignore
+++ b/.gitignore
@@ -194,7 +194,7 @@ topology/uninstall_topology.sql
 libpgcommon/Makefile
 libpgcommon/cunit/Makefile
 utils/Makefile
-utils/postgis_restore.pl
+utils/postgis_restore
 utils/postgis_restore_data.*
 doc/sfcgal_comments.sql
 postgis/sfcgal.sql
diff --git a/NEWS b/NEWS
index 01a9d252b..a09d4002b 100644
--- a/NEWS
+++ b/NEWS
@@ -15,6 +15,14 @@ Changes since 3.4.0beta1 release
          and also put in new version requirements
          (Jelte Fennema, Regina Obe)
 
+* Enhancements *
+
+  #5447, man pages for postgis_restore and postgis scripts
+
+* Breaking Changes *
+
+  #5447, postgis_restore.pl renamed to postgis_restore
+
 PostGIS 3.4.0beta1
 2023/07/14
 
diff --git a/doc/administration.xml b/doc/administration.xml
index 3eb2eb1a0..a839b9beb 100644
--- a/doc/administration.xml
+++ b/doc/administration.xml
@@ -272,7 +272,7 @@ ALTER EXTENSION postgis_topology UPDATE TO "&last_release_version;next";</progra
 	  </para>
 
 	  <para>
-		The dump/reload process is assisted by the postgis_restore.pl
+		The dump/reload process is assisted by the postgis_restore
 		script which takes care of skipping from the dump all
 		definitions which belong to PostGIS (including old ones),
 		allowing you to restore your schemas and data into a
@@ -341,12 +341,12 @@ ALTER EXTENSION postgis_topology UPDATE TO "&last_release_version;next";</progra
 	  <para>
 		Restore your backup into your fresh
 		<varname>newdb</varname> database using
-		postgis_restore.pl.
+		postgis_restore.
 		Unexpected errors, if any, will be printed to the standard
 		error stream by psql. Keep a log of those.
 	  </para>
 
-	  <programlisting>perl utils/postgis_restore.pl "/somepath/olddb.backup" | psql -h localhost -p 5432 -U postgres newdb 2> errors.txt</programlisting>
+	  <programlisting>postgis_restore "/somepath/olddb.backup" | psql -h localhost -p 5432 -U postgres newdb 2> errors.txt</programlisting>
 
 	</listitem>
 
@@ -412,10 +412,10 @@ ALTER TABLE spatial_ref_sys ADD PRIMARY KEY(srid));
     <para>
 		In this case, you can try following steps : first throw
 		out completely the IGN from the sql which is resulting
-		from postgis_restore.pl. So, after having run :
+		from postgis_restore. So, after having run :
     </para>
 
-		<programlisting>perl utils/postgis_restore.pl "/somepath/olddb.backup" > olddb.sql</programlisting>
+		<programlisting>postgis_restore "/somepath/olddb.backup" > olddb.sql</programlisting>
 
     <para>
 		run this command :
diff --git a/liblwgeom/lwutil.c b/liblwgeom/lwutil.c
index 5f63acfa8..affeac731 100644
--- a/liblwgeom/lwutil.c
+++ b/liblwgeom/lwutil.c
@@ -342,7 +342,7 @@ clamp_srid(int32_t srid)
 	} else if ( srid > SRID_MAXIMUM ) {
     newsrid = SRID_USER_MAXIMUM + 1 +
       /* -1 is to reduce likelyhood of clashes */
-      /* NOTE: must match implementation in postgis_restore.pl */
+      /* NOTE: must match implementation in postgis_restore */
       ( srid % ( SRID_MAXIMUM - SRID_USER_MAXIMUM - 1 ) );
 		lwnotice("SRID value %d > SRID_MAXIMUM converted to %d", srid, newsrid);
 	}
diff --git a/regress/run_test.pl b/regress/run_test.pl
index cb391df4c..8a118af0f 100755
--- a/regress/run_test.pl
+++ b/regress/run_test.pl
@@ -179,7 +179,7 @@ sub raster2pgsql
 our $POSTGIS_RESTORE;
 sub postgis_restore
 {
-    $POSTGIS_RESTORE = findOrDie 'postgis_restore.pl', @_ unless defined($POSTGIS_RESTORE);
+    $POSTGIS_RESTORE = findOrDie 'postgis_restore', @_ unless defined($POSTGIS_RESTORE);
 }
 
 if ( $OPT_UPGRADE_PATH )
@@ -2107,7 +2107,7 @@ sub restore_db
         print "Restoring database '${DB}' using pg_restore\n";
         $rv = system("pg_restore -d ${DB} ${DBDUMP} >> $REGRESS_LOG 2>&1");
     } else {
-        print "Restoring database '${DB}' using postgis_restore.pl\n";
+        print "Restoring database '${DB}' using postgis_restore\n";
         my $cmd = postgis_restore() . " ${DBDUMP} | psql --set ON_ERROR_STOP=1 -X ${DB} >> $REGRESS_LOG 2>&1";
         $rv = system($cmd);
     }
diff --git a/utils/Makefile.in b/utils/Makefile.in
index 4e72d51b4..386c2afe2 100644
--- a/utils/Makefile.in
+++ b/utils/Makefile.in
@@ -30,7 +30,7 @@ VPATH := @srcdir@
 SHELL = @SHELL@
 INSTALL = $(SHELL) @top_srcdir@/build-aux/install-sh
 
-SCRIPTS_built = postgis_restore.pl
+SCRIPTS_built = postgis_restore
 
 SCRIPTS = \
 	create_uninstall.pl \
@@ -69,7 +69,7 @@ $(top_builddir)/raster/rt_pg/uninstall_rtpostgis.sql:
 $(top_builddir)/topology/uninstall_topology.sql:
 	$(MAKE) -C ../topology/ uninstall_topology.sql
 
-postgis_restore_data.hardcoded: postgis_restore.pl.in Makefile
+postgis_restore_data.hardcoded: postgis_restore.in Makefile
 	sed -e '1,/^__END__/d' $< \
 		| sort -u \
 		> $@
@@ -79,13 +79,13 @@ postgis_restore_data.generated: $(DROP_FILES) Makefile create_skip_signatures.pl
 		| sort \
 		> $@
 
-postgis_restore.pl: postgis_restore.pl.in postgis_restore_data.hardcoded postgis_restore_data.generated Makefile
+postgis_restore: postgis_restore.in postgis_restore_data.hardcoded postgis_restore_data.generated Makefile
 	cat $< \
 		| sed '/^__END__/q' \
 		| sed 's, at SRID_MAXIMUM@,$(SRID_MAXIMUM),g;s, at SRID_USER_MAXIMUM@,$(SRID_USER_MAXIMUM),' \
-		> postgis_restore.pl
+		> $@
 	cat postgis_restore_data.hardcoded postgis_restore_data.generated \
-		| sort -u >> postgis_restore.pl
+		| sort -u >> $@
 	chmod +x $@
 
 postgis_restore_data.needlessly-hardcoded: postgis_restore_data.hardcoded postgis_restore_data.generated
@@ -93,15 +93,15 @@ postgis_restore_data.needlessly-hardcoded: postgis_restore_data.hardcoded postgi
 
 postgis_restore-check: postgis_restore_data.needlessly-hardcoded
 	@if test -s $<; then { \
-		echo "Needlessly hardcoded signatures found postgis_restore.pl.in:"; \
+		echo "Needlessly hardcoded signatures found postgis_restore.in:"; \
 		sed 's/^/  /' $<; \
 		echo "Use 'make postgis_restore-clean' to fix that"; \
 	} >&2 && false; fi
 
 
 postgis_restore-clean: postgis_restore_data.needlessly-hardcoded
-	mv $(srcdir)/postgis_restore.pl.in $(srcdir)/postgis_restore.pl.in~
-	grep -Fxvf $< $(srcdir)/postgis_restore.pl.in~ > $(srcdir)/postgis_restore.pl.in
+	mv $(srcdir)/postgis_restore.in $(srcdir)/postgis_restore.in~
+	grep -Fxvf $< $(srcdir)/postgis_restore.in~ > $(srcdir)/postgis_restore.in
 
 clean:
 	rm -f $(SCRIPTS_built) postgis_restore_data.*
diff --git a/utils/README b/utils/README
index c8b4cc165..4d567585b 100644
--- a/utils/README
+++ b/utils/README
@@ -1,7 +1,7 @@
 test_estimation.pl
 	test selectivity estimator for the && (overlap) operator
 
-postgis_restore.pl
+postgis_restore
 	restore a spatial database dump to a (possibly updated)
 	new spatial database.
 
diff --git a/utils/create_skip_signatures.pl b/utils/create_skip_signatures.pl
index 81696964e..05c6bbea3 100644
--- a/utils/create_skip_signatures.pl
+++ b/utils/create_skip_signatures.pl
@@ -12,7 +12,7 @@
 #---------------------------------------------------------------------
 #
 # This script is aimed at generating a list of objects
-# signatures used by postgis_restore.pl to decide
+# signatures used by postgis_restore to decide
 # which objects belong to PostGIS
 #
 #---------------------------------------------------------------------
diff --git a/utils/postgis_restore.pl.in b/utils/postgis_restore.in
similarity index 100%
rename from utils/postgis_restore.pl.in
rename to utils/postgis_restore.in

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

Summary of changes:
 .gitignore                                          |  2 +-
 NEWS                                                |  8 ++++++++
 doc/administration.xml                              | 10 +++++-----
 liblwgeom/lwutil.c                                  |  2 +-
 regress/run_test.pl                                 |  4 ++--
 utils/Makefile.in                                   | 16 ++++++++--------
 utils/README                                        |  2 +-
 utils/create_skip_signatures.pl                     |  2 +-
 utils/{postgis_restore.pl.in => postgis_restore.in} |  0
 9 files changed, 27 insertions(+), 19 deletions(-)
 rename utils/{postgis_restore.pl.in => postgis_restore.in} (100%)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list