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 05:45:06
Message-ID: fb7979177b7ab44d9abc2d423391de4ad9faea46.camel@j-davis.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 2026-06-22 at 19:02 -0700, Jeff Davis wrote:
> v4 attached.

v5 attached.

There's an extra patch 0002 to fix a logic bug when handling final
sigma (only affects the builtin pg_unicode_fast locale), which I think
should be backported to 18.

Also added tests.

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 5.2 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 Michael Paquier 2026-06-24 05:57:47 Re: Add per-backend lock statistics
Previous Message Bharath Rupireddy 2026-06-24 05:40:44 Re: Fix publisher-side sequence permission reporting