[postgis-tickets] r14656 - Re-append "topology" schema on restore, with --dumprestore
Sandro Santilli
strk at keybit.net
Tue Feb 9 10:20:56 PST 2016
Author: strk
Date: 2016-02-09 10:20:56 -0800 (Tue, 09 Feb 2016)
New Revision: 14656
Modified:
branches/2.2/regress/run_test.pl
Log:
Re-append "topology" schema on restore, with --dumprestore
See #3454
Modified: branches/2.2/regress/run_test.pl
===================================================================
--- branches/2.2/regress/run_test.pl 2016-02-09 18:20:36 UTC (rev 14655)
+++ branches/2.2/regress/run_test.pl 2016-02-09 18:20:56 UTC (rev 14656)
@@ -1539,8 +1539,21 @@
if ( $rv ) {
fail("Could not restore ${DB}", $REGRESS_LOG);
die;
- };
+ }
+ if ( $OPT_WITH_TOPO )
+ {
+ # We need to re-add "topology" to the search_path as it is lost
+ # on dump/reload, see https://trac.osgeo.org/postgis/ticket/3454
+ my $psql_opts = "--no-psqlrc --variable ON_ERROR_STOP=true";
+ my $cmd = "psql $psql_opts -c \"SELECT topology.AddToSearchPath('topology')\" $DB >> $REGRESS_LOG 2>&1";
+ $rv = system($cmd);
+ if ( $rv ) {
+ fail("Error encountered adding topology to search path after restore", $REGRESS_LOG);
+ die;
+ }
+ }
+
unlink($DBDUMP);
return 1;
More information about the postgis-tickets
mailing list