[postgis-tickets] [SCM] PostGIS branch master updated. 3.1.0alpha1-40-gec43bd2
git at osgeo.org
git at osgeo.org
Tue Mar 10 04:51:58 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 ec43bd2afd3071bc677691ee5f2ae6dc33a47555 (commit)
from aa47e79245fbabad1acf5cf94585f2bae01eed79 (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 ec43bd2afd3071bc677691ee5f2ae6dc33a47555
Author: Sandro Santilli <strk at kbt.io>
Date: Tue Mar 10 12:51:42 2020 +0100
Intercept and nicely print errors from db connections
diff --git a/loader/postgis.pl b/loader/postgis.pl
index 695ecba..5ef2457 100644
--- a/loader/postgis.pl
+++ b/loader/postgis.pl
@@ -68,8 +68,15 @@ SELECT n.nspname
AND p.proname = 'postgis_full_version'
";
- my $SCHEMA=`psql -qXtA ${db} -c "${sql}"`;
+ my $SCHEMA=`psql -qXtA ${db} -c "${sql}" 2>&1`;
chop($SCHEMA);
+ if ( $? ne 0 )
+ {
+ $SCHEMA =~ s/^.*FATAL: *//;
+ print "db $db cannot be inspected: $SCHEMA\n";
+ next;
+ }
+
if ( ! "$SCHEMA" )
{
print "db $db does not have postgis enabled\n";
-----------------------------------------------------------------------
Summary of changes:
loader/postgis.pl | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list