aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/test/regress/pg_regress.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/regress/pg_regress.c b/src/test/regress/pg_regress.c
index 9b3b5d82d8a..bc16d04b9f1 100644
--- a/src/test/regress/pg_regress.c
+++ b/src/test/regress/pg_regress.c
@@ -2257,6 +2257,17 @@ regression_main(int argc, char *argv[], init_function ifunc, test_function tfunc
optind++;
}
+ /*
+ * We must have a database to run the tests in; either a default name, or
+ * one supplied by the --dbname switch.
+ */
+ if (!(dblist && dblist->str && dblist->str[0]))
+ {
+ fprintf(stderr, _("%s: no database name was specified\n"),
+ progname);
+ exit(2);
+ }
+
if (config_auth_datadir)
{
#ifdef ENABLE_SSPI