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 1ktiWo-0006ZJ-Ed for pgsql-bugs@arkaria.postgresql.org; Mon, 28 Dec 2020 02:44:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ktiWn-0005f8-Be for pgsql-bugs@arkaria.postgresql.org; Mon, 28 Dec 2020 02:44:57 +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 1ktiWn-0005f0-5Z for pgsql-bugs@lists.postgresql.org; Mon, 28 Dec 2020 02:44:57 +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 1ktiWl-00064b-7w for pgsql-bugs@lists.postgresql.org; Mon, 28 Dec 2020 02:44:56 +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 0BS2iqe61539118; Sun, 27 Dec 2020 21:44:52 -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: <1536871.1609120125@sss.pgh.pa.us> Comments: In-reply-to Daniele Varrazzo message dated "Mon, 28 Dec 2020 02:37:03 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1539116.1609123492.1@sss.pgh.pa.us> Date: Sun, 27 Dec 2020 21:44:52 -0500 Message-ID: <1539117.1609123492@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Daniele Varrazzo writes: > On Mon, 28 Dec 2020 at 01:48, Tom Lane wrote: >> Isn't there a psycopg3 bug here >> too, that it's not coping with a null default sanely? > As far as I can see, psycopg3 reports the distinction between nulls > and empty strings ok: see the "compiled" values in this sample. Or > maybe I didn't understand your observation? If the null parameter gets passed through cleanly, why don't we end up with connectOptions2 inserting the correct value (line 1257 as of HEAD)? It's possible that there's more than one thing going wrong here, but I don't really understand why the existing code is leading to a failure. regards, tom lane