Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tjHO0-0085aG-U4 for pgsql-hackers@arkaria.postgresql.org; Sat, 15 Feb 2025 12:35:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tjHMz-001BqA-PP for pgsql-hackers@arkaria.postgresql.org; Sat, 15 Feb 2025 12:34:05 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tjHMz-001Bpz-BS for pgsql-hackers@lists.postgresql.org; Sat, 15 Feb 2025 12:34:05 +0000 Received: from mout-p-201.mailbox.org ([80.241.56.171]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tjHMv-000wyZ-0p for pgsql-hackers@lists.postgresql.org; Sat, 15 Feb 2025 12:34:03 +0000 Received: from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4Yw7dJ4Hh9z9sTr; Sat, 15 Feb 2025 13:33:56 +0100 (CET) Date: Sat, 15 Feb 2025 13:33:54 +0100 From: Christoph Berg To: Andres Freund Cc: Tom Lane , Justin Pryzby , pgsql-hackers@lists.postgresql.org Subject: Re: pg17.3 PQescapeIdentifier() ignores len Message-ID: References: <3718360.1739473209@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Re: Andres Freund > > > The fprintf suggests that since 5dc1e42b4 PQescapeIdentifier ignores its len. > > > > Ugh, yes. Need something like the attached. > > I just pushed this fix, together with an expansion of test_escape.c. With the > expanded test both uses of strlen() are detected. FTR, this is also caught by pygresql's regression tests: test_inserttable_with_dotted_table_name (tests.test_classic_connection.TestInserttable.test_inserttable_with_dotted_table_name) ... ERROR https://ci.debian.net/packages/p/pygresql/testing/amd64/57838998/ https://qa.debian.org/excuses.php?package=postgresql-17 What's missing in the PG regression tests to see that problem? Christoph