From 78dd11a44874f753d10a284291c12b2c76d62053 Mon Sep 17 00:00:00 2001 From: Paul Ramsey Date: Fri, 8 Mar 2019 18:05:43 +0000 Subject: [PATCH] Try to drop the database before creating a new one, using a conditional drop in dropdb --if-exists git-svn-id: http://svn.osgeo.org/postgis/trunk@17304 b70326c6-7e19-0410-871a-916f4a2858ee --- regress/run_test.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/regress/run_test.pl b/regress/run_test.pl index f3857aa6b..f7f7ec054 100755 --- a/regress/run_test.pl +++ b/regress/run_test.pl @@ -1215,8 +1215,10 @@ sub count_db_objects ################################################################## sub create_db { - my $cmd = "createdb --encoding=UTF-8 --template=template0 --lc-collate=C $DB > $REGRESS_LOG"; - return system($cmd); + my $dropcmd = "dropdb --if-exists $DB > $REGRESS_LOG"; + my $createcmd = "createdb --encoding=UTF-8 --template=template0 --lc-collate=C $DB > $REGRESS_LOG"; + system($dropcmd); + return system($createcmd); } sub create_spatial -- 2.40.0