Re: Missing compiled default for channel_binding param from PQconndefaults

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Daniele Varrazzo <daniele.varrazzo@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org
Date: 2020-12-28T01:48:45Z
Lists: pgsql-bugs
Daniele Varrazzo <daniele.varrazzo@gmail.com> writes:
> compiled is expected to be "prefer" or "disable" as per docs.
> Please find a patch attached.

Yeah, that does look inconsistent, and I don't object to fixing
it.  But it's already the case that not all connection parameters
have defaults in that struct.  Isn't there a psycopg3 bug here
too, that it's not coping with a null default sanely?

I'm a bit suspicious that psycopg3 is expecting that NULL and
empty-string are equivalent for all parameters.  That is a convention
we upheld for a long time, but recent parameters have gotten away
from that --- not only channel_binding, but others such as sslmode.
If that's the underlying cause here then we need to think about
whether we want to restore that expectation.

			regards, tom lane



Commits

  1. Expose the default for channel_binding in PQconndefaults().