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 1tjN1Y-00990x-Fp for pgsql-hackers@arkaria.postgresql.org; Sat, 15 Feb 2025 18:36:20 +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 1tjN0Y-002x1k-R7 for pgsql-hackers@arkaria.postgresql.org; Sat, 15 Feb 2025 18:35:18 +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 1tjN0Y-002x1c-HV for pgsql-hackers@lists.postgresql.org; Sat, 15 Feb 2025 18:35:18 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tjN0V-0011d2-2X for pgsql-hackers@postgresql.org; Sat, 15 Feb 2025 18:35:17 +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 51FIZAiV080375; Sat, 15 Feb 2025 13:35:10 -0500 From: Tom Lane To: Andres Freund cc: Andrew Dunstan , Noah Misch , pgsql-hackers@postgresql.org, pgsql@j-davis.com Subject: Re: Decision by Monday: PQescapeString() vs. encoding violation In-reply-to: <7vmfuavitlhjgruidll67y5cd4s3m66m4x7c4yxezkxlo4dxvv@4haeja2xdn2q> References: <20250215012712.45@rfd.leadboat.com> <77190.1739642883@sss.pgh.pa.us> <7vmfuavitlhjgruidll67y5cd4s3m66m4x7c4yxezkxlo4dxvv@4haeja2xdn2q> Comments: In-reply-to Andres Freund message dated "Sat, 15 Feb 2025 13:23:51 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <80373.1739644510.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sat, 15 Feb 2025 13:35:10 -0500 Message-ID: <80374.1739644510@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andres Freund writes: > It seems that nobody is arguing against the "just skip one byte" behavio= ur, so > I'm inclined to push this fairly soon, even if Noah's "24 hours" haven't= quite > elapsed. A few more cycles in the buildfarm wouldn't hurt. Agreed. I thought there would be more discussion, but it seems nobody really objects to changing this. The other thing that was discussed in the security thread was modifying PQescapeStringInternal and PQescapeInternal to produce no more than one complaint about invalid multibyte characters, on the grounds that input that's just plain in some other encoding would otherwise produce a ton of repetitive messages. That seems trivial enough to mechanize with a bool already_complained flag, so I think we should incorporate that refinement while we're here. I can write that patch if you're busy. regards, tom lane