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