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 1tjLRw-008q3R-Ei for pgsql-hackers@arkaria.postgresql.org; Sat, 15 Feb 2025 16:55:28 +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 1tjLRu-002Kfv-0Z for pgsql-hackers@arkaria.postgresql.org; Sat, 15 Feb 2025 16:55:26 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tjLRt-002KbP-MN for pgsql-hackers@lists.postgresql.org; Sat, 15 Feb 2025 16:55:25 +0000 Received: from mout-p-102.mailbox.org ([80.241.56.152]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tjLRn-0010n7-2O for pgsql-hackers@lists.postgresql.org; Sat, 15 Feb 2025 16:55:23 +0000 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (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-102.mailbox.org (Postfix) with ESMTPS id 4YwFQn6bjzz9shs; Sat, 15 Feb 2025 17:55:13 +0100 (CET) Date: Sat, 15 Feb 2025 17:55:12 +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: X-Rspamd-Queue-Id: 4YwFQn6bjzz9shs List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Re: Andres Freund > > What's missing in the PG regression tests to see that problem? > > Well, the expanded tests added as part of the fix would catch it, but I agree, > it's a problem this wasn't caught beforehand. Oh sorry, I was actually skimming the git log to see if there is a test, but then failed to realize there is one. Thanks! > I don't think that common uses of PQescapeIdentifier/Literal are likely to > catch the problem, so it's perhaps not too surprising it wasn't caught. Which, > I guess, shows that we really need more explicit edge-case coverage of at > least the most crucial APIs (we barely have any). There's pretty much no way > that pg_regress or TAP test style tests are going to catch a problem like > this. What I can do is to trigger regression tests on all packages on apt.postgresql.org after the minor releases have been built and then raise any flags before the release goes out. Except that pygresql isn't yet a package on apt.pg.o... will fix that now. This time, the problem was caught by Debian's CI machinery. Christoph