From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: akos@elegran.com
Subject: BUG #15025: PSQL CLI - inconsistency when both -d and -U supplies a username
Date: Tue, 23 Jan 2018 13:00:13 +0000
Message-ID: <20180123130013.7407.24749@wrigleys.postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 15025
Logged by: Akos Vandra
Email address: akos@elegran.com
PostgreSQL version: 9.5.4
Operating system: Debian
Description:
Repro:
case 1: psql -U other_user -d "postgresql://some_user@host/db"
case 2: psql -d "postgresql://some_user@host/db" -U other_user
Expectation:
Use whatever is given later:
case 1: log in as user
case 2: log in as other_user
Actual:
case 1: logs in as user
case 2:
- the password prompt asks for the pw of user
- psql uses the password given to log in with other_user
- if the pw is correct for user, or incorrect it displays that the
password is incorrect for other_user
- if the password is correct for other_user, it connects to the db as
other_user
$ psql "postgresql://user@host/db" -U other_user
Password for user other_user:
psql: FATAL: password authentication failed for user "user"
FATAL: password authentication failed for user "user"
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: noreply@postgresql.org, akos@elegran.com
Subject: Re: BUG #15025: PSQL CLI - inconsistency when both -d and -U supplies a username
In-Reply-To: <20180123130013.7407.24749@wrigleys.postgresql.org>
References: <20180123130013.7407.24749@wrigleys.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox