]> granicus.if.org Git - postgis/commitdiff
Ensure restored database is created the same as the initial one
authorSandro Santilli <strk@keybit.net>
Tue, 9 Feb 2016 22:04:46 +0000 (22:04 +0000)
committerSandro Santilli <strk@keybit.net>
Tue, 9 Feb 2016 22:04:46 +0000 (22:04 +0000)
Fixes ORDER BY consistency, probably also with the loader tests
already tweaked to workaround this

See #3444

git-svn-id: http://svn.osgeo.org/postgis/trunk@14657 b70326c6-7e19-0410-871a-916f4a2858ee

regress/run_test.pl

index 4d85a85f3ffd5b92673537a2158cfb0bfe218d37..fd9e431801187a69b7cfb0049c7e93f755db8126 100755 (executable)
@@ -1197,13 +1197,19 @@ sub count_db_objects
 ##################################################################
 # Create the spatial database
 ##################################################################
+sub create_db
+{
+       my $cmd = "createdb --encoding=UTF-8 --template=template0 --lc-collate=C $DB > $REGRESS_LOG";
+       return system($cmd);
+}
+
 sub create_spatial 
 {
        my ($cmd, $rv);
        print "Creating database '$DB' \n";
 
-       $cmd = "createdb --encoding=UTF-8 --template=template0 --lc-collate=C $DB > $REGRESS_LOG";
-       $rv = system($cmd);
+  $rv = create_db();
+
        $cmd = "createlang plpgsql $DB >> $REGRESS_LOG 2>&1";
        $rv = system($cmd);
 
@@ -1529,7 +1535,7 @@ sub dump_restore
                die;
   }
 
-  $rv = system("createdb ${DB} >> $REGRESS_LOG 2>&1");
+  $rv = create_db();
   if ( $rv ) {
     fail("Could not create ${DB}", $REGRESS_LOG);
                die;