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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Noah Misch <noah(at)leadboat(dot)com>, pgsql-hackers(at)postgresql(dot)org, pgsql(at)j-davis(dot)com
Subject: Re: Decision by Monday: PQescapeString() vs. encoding violation
Date: 2025-02-15 18:35:10
Message-ID: 80374.1739644510@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andres Freund <andres(at)anarazel(dot)de> writes:
> It seems that nobody is arguing against the "just skip one byte" behaviour, 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2025-02-15 18:38:52 Re: Decision by Monday: PQescapeString() vs. encoding violation
Previous Message Andres Freund 2025-02-15 18:23:51 Re: Decision by Monday: PQescapeString() vs. encoding violation