From bf9c7f69f284c34f8e0706ef7e7c651de521bd26 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Tue, 9 Feb 2016 18:20:36 +0000 Subject: [PATCH] Re-append "topology" schema on restore, with --dumprestore See #3454 git-svn-id: http://svn.osgeo.org/postgis/trunk@14655 b70326c6-7e19-0410-871a-916f4a2858ee --- regress/run_test.pl | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/regress/run_test.pl b/regress/run_test.pl index cf49b4963..4d85a85f3 100755 --- a/regress/run_test.pl +++ b/regress/run_test.pl @@ -1539,7 +1539,20 @@ sub dump_restore 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); -- 2.40.0