Re: authtype parameter in libpq

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: authtype parameter in libpq
Date: 2021-03-04 15:06:36
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

> On 3 Mar 2021, at 14:47, Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:
> On 26.02.21 21:02, Daniel Gustafsson wrote:
>> When looking at disallowing SSL compression I found the parameter "authtype"
>> which was deprecated in commit d5bbe2aca55bc8 on January 26 1998. While I do
>> think there is a case to be made for the backwards compatibility having run its
>> course on this one, shouldn't we at least remove the environment variable and
>> default compiled fallback for it to save us a getenv call when filling in the
>> option defaults?
> The argument of avoiding unnecessary getenv() calls is sensible. PGTTY should get the same treatment.

The reason I left PGTTY alone is that we still have a way to extract the value
set via PQtty(), so removing one or two ways of setting it while at the same
time allowing the value to be read back seemed inconsistent regardless of its

authtype is completely dead in terms of reading back the value, to the point of
it being a memleak if it indeed was found in as an environment variable.

> But I tend to think we should remove them both altogether (modulo ABI and API preservation).

No disagreement from me, the attached takes a stab at that to get an idea what
it would look like. PQtty is left to maintain API stability but the parameters
are removed from the conn object as thats internal to libpq.

Daniel Gustafsson

Attachment Content-Type Size
v2-0001-Remove-deprecated-parameters-authtype-and-pqtty.patch application/octet-stream 7.2 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2021-03-04 15:16:49 Re: Increase value of OUTER_VAR
Previous Message walker 2021-03-04 15:06:07 Re: make coverage-html would fail within build directory separate from source tree