[postgis-tickets] [SCM] PostGIS branch stable-3.1 updated. 3.1.3-26-g1a86e86

git at osgeo.org git at osgeo.org
Thu Sep 2 15:34:46 PDT 2021


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, stable-3.1 has been updated
       via  1a86e863aa799b34fb862ea96c9b177f914a53a0 (commit)
      from  ef2995b4acebeb46581ccbf807b03051aab6a06f (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 1a86e863aa799b34fb862ea96c9b177f914a53a0
Author: Sandro Santilli <strk at kbt.io>
Date:   Thu Sep 2 13:54:11 2021 +0200

    Set postgis installation schema by default to the schema found in dump
    
    References #4782 in 3.1 branch (3.1.4dev)

diff --git a/NEWS b/NEWS
index 2d5e47e..061b79a 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,8 @@ PostGIS 3.1.4dev
 2021/xx/xx
 
 * Bug Fixes
+  - #4782, Have postgis_restore.pl use backup postgis schema by
+           default (Sandro Santilli)
   - #4854, Fix type of TopoGeometry receiving different-type
            TopoGeometry components (Sandro Santilli)
   - #4918, Fix rare crash in st_minpossiblevalue (Paul Ramsey)
diff --git a/utils/postgis_restore.pl.in b/utils/postgis_restore.pl.in
index 8498c54..efb974e 100644
--- a/utils/postgis_restore.pl.in
+++ b/utils/postgis_restore.pl.in
@@ -129,6 +129,16 @@ while( my $l = <DUMP> ) {
   my $sigHR = linesignature($l);
   my $sig = $sigHR; $sig =~ s/\s//g;
   $hasTopology = 1 if $sig eq 'SCHEMAtopology';
+
+	if ( not defined ($POSTGIS_SCHEMA) )
+	{
+		if ( $l =~ / TABLE DATA ([^ ]*) spatial_ref_sys / )
+		{
+			$POSTGIS_SCHEMA = $1;
+			print STDERR "Setting postgis schema to $POSTGIS_SCHEMA, as found in the dump";
+		}
+	}
+
   if ( $skip{$sig} ) {
     print STDERR "SKIP: $sigHR\n" if $DEBUG;
     next

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

Summary of changes:
 NEWS                        |  2 ++
 utils/postgis_restore.pl.in | 10 ++++++++++
 2 files changed, 12 insertions(+)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list