Re: right() returns the whole string for the most negative n - Mailing list pgsql-hackers

From David Rowley
Subject Re: right() returns the whole string for the most negative n
Date
Msg-id CAApHDvp+w04D2bXRqMgG1NrH+apGe6JAqiWHmzmCtXTKQK1ShQ@mail.gmail.com
Whole thread
Responses Re: Row pattern recognition
Re: WAL compression setting after PostgreSQL LZ4 default change
List pgsql-hackers
On Thu, 27 Aug 2026 at 14:27, Ewan Young <kdbase.hack@gmail.com> wrote:
> Rather than pile that cleanup onto this bug-fix thread, I'll send it as a
> separate follow-up so this fix can be considered on its own.  Will post
> that shortly and CC you three.

Yes, another thread. Please also include a description of your method
for verifying the code matches for non-HAVE__BUILTIN_OP_OVERFLOW
builds.

Also, pg_neg_s32_overflow() was introduced in 2024 by 0a27c3d0f733,
which is v18+. Depending on Daniel's patience for backpatching two
different versions, it might be worth just using the == PG_INT32_MIN
method to fix the bug, then allowing the follow-up patch to switch
that in v20 only.  That would mean v18 and v19 don't get the most
optimal fix, but it's hard to imagine that's going to be performance
critical.

David



Attachment

pgsql-hackers by date:

Previous
From: Richard Guo
Date:
Subject: Re: remove_useless_joins vs. bug #19560
Next
From: Henson Choi
Date:
Subject: Re: Row pattern recognition