Re: Small improvements to substring() - Mailing list pgsql-hackers

From Chao Li
Subject Re: Small improvements to substring()
Date
Msg-id 3D14DF4C-112E-4748-B38E-0A94CDC9B635@gmail.com
Whole thread Raw
In response to Small improvements to substring()  (Thomas Munro <thomas.munro@gmail.com>)
Responses Re: Small improvements to substring()
List pgsql-hackers

> On Feb 15, 2026, at 05:45, Thomas Munro <thomas.munro@gmail.com> wrote:
>
> Hi,
>
> As recently discussed on pgsql-bugs[1], substring() does unnecessary
> work that can easily be deleted.  Here's a patch to try that.
>
> [1] https://www.postgresql.org/message-id/flat/19406-9867fddddd724fca%40postgresql.org
> <v1-0001-Improve-substring-implementation.patch>

Thanks for the patch. This is a great cleanup. The single-pass logic is more efficient, the special cases for empty
stringshave been removed, and the code is easier to follow now. After reviewing and playing with it, I don’t get any
commentto raise. 

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/







pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: index prefetching
Next
From: Chao Li
Date:
Subject: Re: pgstat include expansion