Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ru9qu-00317j-VJ for pgsql-hackers@arkaria.postgresql.org; Tue, 09 Apr 2024 11:41:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1ru9qt-003lrs-TW for pgsql-hackers@arkaria.postgresql.org; Tue, 09 Apr 2024 11:41:23 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ru9qt-003lrb-K8 for pgsql-hackers@lists.postgresql.org; Tue, 09 Apr 2024 11:41:23 +0000 Received: from cassarossa.samfundet.no ([2001:67c:29f4::29]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ru9qq-00204G-66 for pgsql-hackers@lists.postgresql.org; Tue, 09 Apr 2024 11:41:22 +0000 Received: from olebra by cassarossa.samfundet.no with local (Exim 4.96) (envelope-from ) id 1ru9ql-00FQ9m-2V for pgsql-hackers@lists.postgresql.org; Tue, 09 Apr 2024 13:41:15 +0200 Date: Tue, 9 Apr 2024 13:41:15 +0200 From: Ole Peder =?utf-8?Q?Brandtz=C3=A6g?= To: pgsql-hackers@lists.postgresql.org Subject: Re: NumericShort vs NumericLong format Message-ID: <20240409114115.opvkgfnhejxbffbv@samfundet.no> References: <3804660.1678166127@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3804660.1678166127@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Mar 07, 2023 at 12:15:27AM -0500, Tom Lane wrote: > "David G. Johnston" 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