[postgis-tickets] r14655 - Re-append "topology" schema on restore, with --dumprestore
Sandro Santilli
strk at keybit.net
Tue Feb 9 10:20:37 PST 2016
Author: strk
Date: 2016-02-09 10:20:36 -0800 (Tue, 09 Feb 2016)
New Revision: 14655
Modified:
trunk/regress/run_test.pl
Log:
Re-append "topology" schema on restore, with --dumprestore
See #3454
Modified: trunk/regress/run_test.pl
===================================================================
--- trunk/regress/run_test.pl 2016-02-09 16:52:07 UTC (rev 14654)
+++ trunk/regress/run_test.pl 2016-02-09 18:20:36 UTC (rev 14655)
@@ -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