[postgis-tickets] [SCM] PostGIS branch master updated. cbf2cb157d9c713df678f4f2865e1edaea87c34d

git at osgeo.org git at osgeo.org
Wed Dec 18 01:50:28 PST 2019


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  cbf2cb157d9c713df678f4f2865e1edaea87c34d (commit)
      from  939c30639e36c1d1c299bac589d38f369391b2ab (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 cbf2cb157d9c713df678f4f2865e1edaea87c34d
Author: Sandro Santilli <strk at kbt.io>
Date:   Wed Dec 18 10:46:56 2019 +0100

    Fix postgis_restore.pl for use with PostgreSQL 12
    
    Retains compatibilty with PostgreSQL 9.4 onward
    (PostgreSQL 9.3 would break)
    
    See https://www.postgresql.org/docs/VERSION/app-pgrestore.html
    
    Patch by Matti Linnanvuori
    
    References #4605 in master branch

diff --git a/utils/postgis_restore.pl.in b/utils/postgis_restore.pl.in
index 6b52c8f..5dcc694 100644
--- a/utils/postgis_restore.pl.in
+++ b/utils/postgis_restore.pl.in
@@ -118,7 +118,7 @@ while(my $l = <DATA>) {
 if(!defined($POSTGIS_TOC)) {
   print STDERR "  Writing manifest of things to read from dump file...\n";
 
-  open( DUMP, "pg_restore -l $dumpfile |" ) || die "$me:\tCannot open dump file '$dumpfile'\n";
+  open( DUMP, "pg_restore -f - -l $dumpfile |" ) || die "$me:\tCannot open dump file '$dumpfile'\n";
 } else {
   open( DUMP, '<' . $POSTGIS_TOC) || die "$me:\tCannot open TOC file '$POSTGIS_TOC'\n";
 }
@@ -145,7 +145,7 @@ close(DUMP) || die "$me: pg_restore returned an error\n";
 # unwanted bits.
 #
 print STDERR "  Writing ASCII to stdout...\n";
-open( INPUT, "pg_restore -L $manifest $dumpfile |") || die "$me:\tCan't run pg_restore\n";
+open( INPUT, "pg_restore -L $manifest $dumpfile -f - |") || die "$me:\tCan't run pg_restore\n";
 
 if ( defined $POSTGIS_SCHEMA ) {
   print STDOUT "SET search_path = \"" . $POSTGIS_SCHEMA . "\";\n";

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

Summary of changes:
 utils/postgis_restore.pl.in | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list