]> granicus.if.org Git - postgresql/commitdiff
pg_dump/t/002: append terminating semicolon to SQL commands
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Wed, 3 May 2017 18:12:09 +0000 (15:12 -0300)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Wed, 3 May 2017 18:12:09 +0000 (15:12 -0300)
It's easy to overlook the need for one, and its lack is annoying for the
next developer wanting to create a new test.  Rather than expect every
individual command to add the semicolon, just append one automatically.

Discussion: http://postgr.es/m/20170503172746.rwftidszir67sgk7@alvherre.pgsql

src/bin/pg_dump/t/002_pg_dump.pl

index ccd0ed6a539b2db6506fb20ed8c0539b27649492..0d7a49826a14c5cb421014c1c301ba1581844174 100644 (file)
@@ -6414,7 +6414,8 @@ foreach my $test (
                        next;
                }
 
-               $create_sql .= $tests{$test}->{create_sql};
+               # Add terminating semicolon
+               $create_sql .= $tests{$test}->{create_sql} . ";";
        }
 }