From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bruce Momjian <bruce@momjian.us>
Cc: akos@elegran.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15025: PSQL CLI - inconsistency when both -d and -U supplies a username
Date: Mon, 29 Jan 2018 13:01:09 -0500
Message-ID: <4169.1517248869@sss.pgh.pa.us> (raw)
In-Reply-To: <16151.1517173540@sss.pgh.pa.us>
References: <20180123130013.7407.24749@wrigleys.postgresql.org>
<20180128034832.GD9153@momjian.us>
<29202.1517168326@sss.pgh.pa.us>
<20180128200418.GA4380@momjian.us>
<14400.1517171454@sss.pgh.pa.us>
<20180128203633.GC4380@momjian.us>
<16151.1517173540@sss.pgh.pa.us>
I wrote:
> So I now think the comment I added to do_connect() is unduly pessimistic,
> and it's fine to keep using "prompt_for_password(user)" for a forced
> password prompt there. There may still be use-cases where it gets it
> wrong, but they're too narrow to be worth giving up the helpful prompt
> altogether.
After further thought about that I changed my mind again: it seems better
to be able to say "we never issue a misleading password prompt" than that
"it's right 99% of the time" --- and it looks like in some cases with
nondefault reuse_previous_specification, we'd still get it wrong. So
I made it shorten the prompt if the dbname is a connstring or URI.
Committed with that change.
regards, tom lane
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: tgl@sss.pgh.pa.us, bruce@momjian.us, akos@elegran.com
Subject: Re: BUG #15025: PSQL CLI - inconsistency when both -d and -U supplies a username
In-Reply-To: <4169.1517248869@sss.pgh.pa.us>
References: <20180123130013.7407.24749@wrigleys.postgresql.org> <20180128034832.GD9153@momjian.us> <29202.1517168326@sss.pgh.pa.us> <20180128200418.GA4380@momjian.us> <14400.1517171454@sss.pgh.pa.us> <20180128203633.GC4380@momjian.us> <16151.1517173540@sss.pgh.pa.us> <4169.1517248869@sss.pgh.pa.us>
* 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