Re: BUG #16746: [PG12.5 psql] Password ignored by connect meta-command

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: kgradekx(at)gmail(dot)com, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #16746: [PG12.5 psql] Password ignored by connect meta-command
Date: 2020-11-29 02:59:06
Message-ID: 931505.1606618746@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

I wrote:
> Ugh... looks like I broke this in 85c54287a et al. I had thought that
> this was the pre-existing behavior, but after further study I see that
> I was mistaken about how PQconnectdbParams() handles parameter
> replacement, so I misread what the prior code was really doing.

While I take full responsibility for having messed up here, I note that
the documentation for PQconnectdbParams is seriously misleading on the
point, in that it fails to point out that parameters appearing after
"dbname" will only override the connstring if they supply non-empty
values. Besides that, it's rather in need of copy-editing, not to mention
some minimal thought about what is a reasonable order to make its points
in. So I propose the attached docs fix to begin with.

regards, tom lane

Attachment Content-Type Size
fix-PQconnectdbParams-docs.patch text/x-diff 4.2 KB

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2020-11-29 05:00:01 BUG #16750: VACUUM sporadically fails to access pgstat on Cygwin
Previous Message Tom Lane 2020-11-29 02:18:32 Re: BUG #16746: [PG12.5 psql] Password ignored by connect meta-command