[postgis-tickets] r17309 - Drop pre-existing db when running without any special mode flags on database handling

Paul Ramsey pramsey at cleverelephant.ca
Fri Mar 8 03:18:45 PST 2019


Author: pramsey
Date: 2019-03-08 15:18:45 -0800 (Fri, 08 Mar 2019)
New Revision: 17309

Modified:
   trunk/regress/run_test.pl
Log:
Drop pre-existing db when running without any special mode flags on database handling


Modified: trunk/regress/run_test.pl
===================================================================
--- trunk/regress/run_test.pl	2019-03-08 21:51:47 UTC (rev 17308)
+++ trunk/regress/run_test.pl	2019-03-08 23:18:45 UTC (rev 17309)
@@ -235,9 +235,9 @@
 	}
 	else
 	{
-		print STDERR "Database $DB already exists.\n";
-		print STDERR "Drop it, or run with the --nocreate flag to use it.\n";
-		exit(1);
+		print STDERR "Database $DB already exists, dropping.\n";
+		`dropdb $DB`;
+		create_spatial();
 	}
 }
 



More information about the postgis-tickets mailing list