Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ktheX-0004c5-BT for pgsql-bugs@arkaria.postgresql.org; Mon, 28 Dec 2020 01:48:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ktheW-0000oY-0J for pgsql-bugs@arkaria.postgresql.org; Mon, 28 Dec 2020 01:48:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ktheV-0000oR-QE for pgsql-bugs@lists.postgresql.org; Mon, 28 Dec 2020 01:48:51 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ktheS-0005UI-PU for pgsql-bugs@lists.postgresql.org; Mon, 28 Dec 2020 01:48:50 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 0BS1mjhx1536872; Sun, 27 Dec 2020 20:48:45 -0500 From: Tom Lane To: Daniele Varrazzo cc: pgsql-bugs@lists.postgresql.org Subject: Re: Missing compiled default for channel_binding param from PQconndefaults In-reply-to: References: Comments: In-reply-to Daniele Varrazzo message dated "Mon, 28 Dec 2020 01:27:08 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1536870.1609120125.1@sss.pgh.pa.us> Date: Sun, 27 Dec 2020 20:48:45 -0500 Message-ID: <1536871.1609120125@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Daniele Varrazzo 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