[postgis-tickets] [SCM] PostGIS branch stable-3.0 updated. cd33bc53c4bab575373025b231483e3721ac77fb

git at osgeo.org git at osgeo.org
Wed Dec 18 01:54:40 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, stable-3.0 has been updated
       via  cd33bc53c4bab575373025b231483e3721ac77fb (commit)
      from  531bc44162c2b3636887eee514aa6c5617589415 (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 cd33bc53c4bab575373025b231483e3721ac77fb
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/NEWS b/NEWS
index d4d946b..df7b408 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,7 @@ XXXX/XX/XX
   - #4590, Fix pg_upgrade issue with st_linecrossingdirection (Raúl Marín)
   - #4599, ST_AddPoint: Accept -1 as a valid position (Raúl Marín)
   - #4600, Improve precision of ST_TileEnvelope (Raúl Marín)
+  - #4605, Fix postgis_upgrade.pl with PostgreSQL 12 (Matti Linnanvuori)
 
 
 PostGIS 3.0.0
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:
 NEWS                        | 1 +
 utils/postgis_restore.pl.in | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list