[postgis-tickets] [SCM] PostGIS branch master updated. 3.1.0alpha1-39-gaa47e79

git at osgeo.org git at osgeo.org
Tue Mar 10 04:42:08 PDT 2020


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  aa47e79245fbabad1acf5cf94585f2bae01eed79 (commit)
      from  1970ba88667b6c0626d3e8ab0cfec77316b22838 (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 aa47e79245fbabad1acf5cf94585f2bae01eed79
Author: Sandro Santilli <strk at kbt.io>
Date:   Tue Mar 10 12:41:49 2020 +0100

    Avoid NOTICE messages from psql commands

diff --git a/loader/postgis.pl b/loader/postgis.pl
index 925b7a3..695ecba 100644
--- a/loader/postgis.pl
+++ b/loader/postgis.pl
@@ -39,7 +39,7 @@ sub upgrade
   foreach my $db (@_)
   {
     print "upgrading db $db\n";
-    my $LOG=`cat <<EOF | psql -XtA ${db}
+    my $LOG=`cat <<EOF | psql -qXtA ${db}
 BEGIN;
 UPDATE pg_catalog.pg_extension SET extversion = 'ANY'
  WHERE extname IN (
@@ -68,7 +68,7 @@ SELECT n.nspname
     AND p.proname = 'postgis_full_version'
 ";
 
-		my $SCHEMA=`psql -XtA ${db} -c "${sql}"`;
+		my $SCHEMA=`psql -qXtA ${db} -c "${sql}"`;
 		chop($SCHEMA);
     if ( ! "$SCHEMA" )
 		{
@@ -77,7 +77,7 @@ SELECT n.nspname
     }
 
     $sql="SELECT ${SCHEMA}.postgis_full_version()";
-    my $FULL_VERSION=`psql -XtA ${db} -c "${sql}"`;
+    my $FULL_VERSION=`psql -qXtA ${db} -c "${sql}"`;
 		#print "FULL_VERSION: ${FULL_VERSION}\n";
 
     #POSTGIS="3.1.0dev r3.1.0alpha1-3-gfc5392de7"
@@ -102,6 +102,9 @@ SELECT n.nspname
   }
 }
 
+# Avoid NOTICE messages
+$ENV{'PGOPTIONS'} = $ENV{'PGOPTIONS'} . ' --client-min-messages=warning';
+
 my $cmd = shift;
 if ( $cmd eq "help" ) {
 	usage(STDOUT);

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

Summary of changes:
 loader/postgis.pl | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list