Specifying a dbname should override the default database, not add to it.
authorMagnus Hagander <magnus@hagander.net>
Tue, 12 Jun 2007 13:54:58 +0000 (13:54 +0000)
committerMagnus Hagander <magnus@hagander.net>
Tue, 12 Jun 2007 13:54:58 +0000 (13:54 +0000)
Fixes buildfarm failures on contribcheck.

src/test/regress/pg_regress.c

index a50614e8ed26e6d01b17021987a2e2a65d18d604..fc5fde17ee897481447923fe85472a0b45681ad4 100644 (file)
@@ -1794,6 +1794,10 @@ regression_main(int argc, char *argv[], init_function ifunc, test_function tfunc
                                printf("pg_regress (PostgreSQL %s)\n", PG_VERSION);
                                exit_nicely(0);
                        case 1:
+                               /* If a default database was specified, we need to remove it before we add
+                                * the specified one.
+                                */
+                               free_stringlist(&dblist);
                                split_to_stringlist(strdup(optarg), ", ", &dblist);
                                break;
                        case 2: