Reject missing database name in pg_regress and cohorts.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 30 Nov 2022 18:01:41 +0000 (13:01 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 30 Nov 2022 18:01:41 +0000 (13:01 -0500)
commitf2f9e11d35226ff8d4cbb737b7c31d072e212178
tree8203d12392d961b4d5a051cc46e496a6b516d61f
parent8592b56faf86be1a8684544ad3a93e2fe8f5aa1b
Reject missing database name in pg_regress and cohorts.

Writing "pg_regress --dbname= ..." led to a crash, because
we weren't expecting there to be no database name supplied.
It doesn't seem like a great idea to run regression tests
in whatever is the user's default database; so rather than
supporting this case let's explicitly reject it.

Per report from Xing Guo.  Back-patch to all supported
branches.

Discussion: https://postgr.es/m/CACpMh+A8cRvtvtOWVAZsCM1DU81GK4DL26R83y6ugZ1osV=ifA@mail.gmail.com
src/test/regress/pg_regress.c