Re: NumericShort vs NumericLong format

From: Ole Peder Brandtzæg <olebra(at)samfundet(dot)no>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: NumericShort vs NumericLong format
Date: 2024-04-09 11:41:15
Message-ID: 20240409114115.opvkgfnhejxbffbv@samfundet.no
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Mar 07, 2023 at 12:15:27AM -0500, Tom Lane wrote:
> "David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
> > As an aside, for anyone more fluent than I who reads this, is the use of
> > the word "dynamic scale" in this code comment supposed to be "display
> > scale"?
> > https://github.com/postgres/postgres/blob/cf96907aadca454c4094819c2ecddee07eafe203/src/backend/utils/adt/numeric.c#L121
>
> Yeah, I think you're right.

Familiarizing myself with numeric.c today, I too was confused by this.
AFAICT, it's meant to say display scale as used elsewhere in the file;
for instance, the comment for NumericShort's n_header reads "Sign +
display scale + weight". Would it be appropriate if I submitted a patch
for this? It's admittedly trivial, but I figured I should say hi before
submitting one.

All the best,
Ole

--
Ole Peder Brandtzæg | En KLST/ITK-hybrid
Please don't look at me with those eyes
Please don't hint that you're capable of lies

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2024-04-09 11:54:25 Re: WIP Incremental JSON Parser
Previous Message Amit Langote 2024-04-09 11:37:29 Re: sql/json remaining issue