Re: [PATCH] Normalize numeric/bigint scientific notation after rounding

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
Cc: Jianqiao Han <hanjianqiao(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] Normalize numeric/bigint scientific notation after rounding
Date: 2026-11-18 17:46:58
Message-ID: 906104.1795024018@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> writes:
> On Mon, 16 Nov 2026 at 15:20, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> There are already places that assume NBASE==10000. Still, I feel
>> that this is overthinking the problem. Jianqiao's solution is
>> obviously correct, and if you think maybe it isn't, changing the
>> "if" into a "while" would take care of any strange roundoff effects
>> in the second division.

> OK, I guess it has the advantage of being nice and simple. Changing
> the "if" to a "while" doesn't make sense.

OK, pushed as-submitted then. I worked on the documentation
a bit while at it, because it really didn't say what we expect
the output to look like.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Srinath Reddy Sadipiralla 2026-11-18 18:18:41 Fix FATAL error when using recovery_target = 'immediate' on cleanly shut down clusters
Previous Message Bharath Rupireddy 2026-11-18 17:42:08 Re: [PATCH] Fall back to serializing when parallel apply runs out of DSM segments