Re: [PATCH] pgbench: Bug fix for the -d option

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: miyake_kouta <miyake_kouta@oss.nttdata.com>
Cc: pgsql-hackers@postgresql.org
Date: 2021-02-26T08:16:17Z
Lists: pgsql-hackers
On Fri, Feb 26, 2021 at 01:18:20PM +0900, miyake_kouta wrote:
> I'm suggesting this bug fix because I think it's a bug, but if there's any
> other intent to this else if statement, could you let me know?

Yes, the existing code could mess up with the selection logic if
PGPORT and PGUSER are both specified in an environment, masking the
value of PGUSER, so let's fix that.  This is as old as 412893b.
--
Michael

Commits

  1. pgbench: Simplify some port, host, user and dbname assignments