pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jeff Davis <pgsql@j-davis.com>
Cc: Chao Li <li.evan.chao@gmail.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Small patch to improve safety of utf8_to_unicode().
Date: Mon, 13 Jul 2026 13:20:39 -0400
Message-ID: <3228230.1783963239@sss.pgh.pa.us> (raw)
In-Reply-To: <3228110.1783963143@sss.pgh.pa.us>
References: <c355354e6c3f4a7aafb047361b73db247260fca0.camel@j-davis.com>
	<541F240E-94AD-4D65-9794-7D6C316BC3FF@gmail.com>
	<f11b6c89612f89b76b758807a32a1d3769652d90.camel@j-davis.com>
	<C09D685C-FA5C-47E1-8EDB-B1FDD635309F@gmail.com>
	<c4b27c82decf5b85523ad01f1df3785d8999f333.camel@j-davis.com>
	<fbcb039a9ab3ba834f34174915254732fdcfae86.camel@j-davis.com>
	<c82358d3b1bbd250a03937534bf76de9f4250d0c.camel@j-davis.com>
	<fb7979177b7ab44d9abc2d423391de4ad9faea46.camel@j-davis.com>
	<313BCA0E-2E74-4EB6-9AA8-10DB7F439151@gmail.com>
	<592441c1d871a4ed0ac1708e132f447caa35869c.camel@j-davis.com>
	<3058CAA1-40E0-4098-893B-615F77CD35E1@gmail.com>
	<0cedb517aee8b79b8e31a4e42885ed88c2a67c5f.camel@j-davis.com>
	<16CAD4DB-9D4A-481A-BB4E-78775C4F4B2C@gmail.com>
	<f7000dc6842c75ace64656f9bf697a050fda0cfb.camel@j-davis.com>
	<FAEA6374-2ED2-4988-8CDD-95157599024D@gmail.com>
	<3213927.1783950167@sss.pgh.pa.us>
	<ea061fe938602cd4321ed17742284ca86310defe.camel@j-davis.com>
	<3228110.1783963143@sss.pgh.pa.us>

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






view thread (27+ messages)  latest in thread

Message-ID: <3228230.1783963239@sss.pgh.pa.us>
Permalink:  ../3228230.1783963239@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3228230.1783963239@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pgsql@j-davis.com, li.evan.chao@gmail.com
  Subject: Re: Small patch to improve safety of utf8_to_unicode().
  In-Reply-To: <3228230.1783963239@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox