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

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Small patch to improve safety of utf8_to_unicode().
Date: 2026-06-24 21:57:41
Message-ID: 592441c1d871a4ed0ac1708e132f447caa35869c.camel@j-davis.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 2026-06-24 at 16:44 +0800, Chao Li wrote:
> There is a compile warning against pg_wchar.h in 0004:

Fixed. I also used a loop in utf8decode() which is slightly smaller,
which is good if we intend it to be inlined by a lot of callers.

Regards,
Jeff Davis

Attachment Content-Type Size
v5-0001-unicode_case.c-defend-against-invalid-UTF8.patch text/x-patch 5.5 KB
v5-0002-pg_unicode_fast-fix-final-sigma-logic.patch text/x-patch 5.3 KB
v5-0003-unicode_case.c-change-API-to-signal-UTF8-decoding.patch text/x-patch 11.8 KB
v5-0004-Validating-iterator-friendly-UTF8-encoder-decoder.patch text/x-patch 4.8 KB
v5-0005-unicode_case.c-use-new-utf8encode-utf8decode-APIs.patch text/x-patch 8.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message surya poondla 2026-06-24 22:58:15 Re: Handle concurrent drop when doing whole database vacuum
Previous Message Tristan Partin 2026-06-24 21:54:00 Re: Add MIN/MAX aggregate support for uuid