Re: BUG #19771: to_char(): NUL byte in result for formats with a trailing decimal point (regression from ec352b37d)

From: Gowtham Reddy <gowthamdoma18(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #19771: to_char(): NUL byte in result for formats with a trailing decimal point (regression from ec352b37d)
Date: 2026-10-20 18:52:56
Message-ID: CAOZ9b+q0EEoZwOvFOMA0qNXxRN9g_6C0kDZYKssbZmDZy-TRJg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi Tom,

Thank you for committing this, and for the explanation about the
back-branches. I understand the reasoning for leaving the
decimal-point question as it is for now.

Regards, Gowtham

On Tue, 20 Oct 2026 at 22:33, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> I wrote:
> > Normally I'd think we should back-patch, but it's possible that
> > people didn't realize this behavior was unintended --- else we'd
> > have heard bug reports sooner. (It's not instantly obvious that
> > we should drop the decimal point but not the sign, I think.)
> > So I'm inclined to leave the stable branches alone. Maybe there's
> > still room to squeeze the fix into v19, though.
>
> Hearing no objections, pushed to 19 and master only.
>
> A fair question about this is why dropping the decimal point is a good
> idea at all. Maybe the actual bug is that there's not a decimal point
> available in the input string. But that would be a bigger behavioral
> change, and again we've heard no complaints in this area. Even if we
> did change how the initial conversion works, this patch would remain a
> good safety feature, so I'm content for now to do this and stop here.
>
> regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2026-10-20 19:24:37 BUG #19778: Empty tsquery cannot roundtrip through binary input
Previous Message Greg Burd 2026-10-20 18:45:06 Re: BUG #19705: One NaN box makes a BRIN box_inclusion_ops index omit unrelated rows