Re: Small patch to improve safety of utf8_to_unicode().

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Small patch to improve safety of utf8_to_unicode().
Date: 2026-07-13 17:20:39
Message-ID: 3228230.1783963239@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> Well, there aren't going to be any ASCII characters that produce 12
> bytes, and probably not any LATIN1 characters either, so I think we
> could assume that the shortest input character that could produce
> such a long output would be 3 bytes.

Ah sorry, I should have written BMP not LATIN1. Maybe it still holds
across that set, but I'm less sure.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Arne Roland 2026-07-13 18:05:14 Re: PlaceholderVars and join removal with appendrel parents
Previous Message Tom Lane 2026-07-13 17:19:03 Re: Small patch to improve safety of utf8_to_unicode().