[postgis-tickets] [SCM] PostGIS branch main updated. 3.1.0rc1-471-g6809237

git at osgeo.org git at osgeo.org
Thu Sep 2 04:54:45 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, main has been updated
       via  6809237109671ebba3c249772fe884e67e4006f6 (commit)
      from  e69072308dee479914007c1365b1269917745698 (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 6809237109671ebba3c249772fe884e67e4006f6
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
    
    Closes #4782

diff --git a/utils/postgis_restore.pl.in b/utils/postgis_restore.pl.in
index 93577b9..09b2a8b 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:
 utils/postgis_restore.pl.in | 10 ++++++++++
 1 file changed, 10 insertions(+)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list