Re: BUG #17625: In PG15 PQsslAttribute returns different values than PG14 when SSL is not in use for the connection

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: Jacob Champion <jchampion(at)timescale(dot)com>, heath(dot)lord(at)crunchydata(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17625: In PG15 PQsslAttribute returns different values than PG14 when SSL is not in use for the connection
Date: 2022-09-30 14:29:47
Message-ID: 640451.1664548187@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Daniel Gustafsson <daniel(at)yesql(dot)se> writes:
> On 29 Sep 2022, at 23:58, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> - Returns an array of SSL attribute names available.
>> + Returns an array of SSL attribute names that can be used
>> + in <function>PQsslAttribute()</function>.

> Maybe hairsplitting, but should we note that it can be used in PQsslAttribute()
> for the conn which was passed as param to PQsslAttributeNames()? In a (still
> hypothetical) multi-library case there is no guarantee that it will be valid
> for another conn.

I thought about doing this, but the subsequent para seems to make it clear
enough:

+ <para>
+ If <literal>conn</literal> is NULL, the attributes available for the
+ default SSL library are returned, or an empty list
+ if <application>libpq</application> was compiled without any SSL
+ support. If <literal>conn</literal> is not NULL, the attributes
+ available for the SSL library in use for the connection are returned,
+ or an empty list if the connection is not encrypted.
+ </para>

The actual constraint is "names that can be used on connections using
the same SSL library", which seems too verbose for the introductory
sentence.

> I'd be fine just doing this in HEAD.

Pushed to HEAD only.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Shane Plesner 2022-10-01 15:18:41 Bug / Unintentional Feature: non-immutable functions can be used for generated columns.
Previous Message Masahiko Sawada 2022-09-30 06:33:40 Re: BUG #17619: AllocSizeIsValid violation in parallel hash join