Re: Decision by Monday: PQescapeString() vs. encoding violation

Jeff Davis <pgsql@j-davis.com>

From: Jeff Davis <pgsql@j-davis.com>
To: Andres Freund <andres@anarazel.de>
Cc: Noah Misch <noah@leadboat.com>, pgsql-hackers@postgresql.org, tgl@sss.pgh.pa.us
Date: 2025-02-15T20:52:09Z
Lists: pgsql-hackers
On Sat, 2025-02-15 at 15:43 -0500, Andres Freund wrote:
> It seems completely infeasible to me to to implement the "single
> error"
> approach in a minor version.

+1, keep with the behavior in the proposed patches.

Even in the next major version, I'd be inclined to try to move toward
interfaces that can produce an error reliably rather than spending more
time trying to use a "better" pattern of invalid bytes.

I just wanted to point out that some kind of decision was made and link
to relevant background information.

Regards,
	Jeff Davis




Commits

  1. Make escaping functions retain trailing bytes of an invalid character.

  2. Fix handling of invalidly encoded data in escaping functions