]> granicus.if.org Git - postgis/commitdiff
Try to drop the database before creating a new one, using a conditional drop in dropd...
authorPaul Ramsey <pramsey@cleverelephant.ca>
Fri, 8 Mar 2019 18:05:43 +0000 (18:05 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Fri, 8 Mar 2019 18:05:43 +0000 (18:05 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@17304 b70326c6-7e19-0410-871a-916f4a2858ee

regress/run_test.pl

index f3857aa6b0841d386083efc7f6a6b4a19694e8a7..f7f7ec0547be3883cd82ac1870666e510028c10c 100755 (executable)
@@ -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