Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m8Pr2-0006v0-Pz for pgsql-committers@arkaria.postgresql.org; Tue, 27 Jul 2021 16:22:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m8Pr1-00080R-8e for pgsql-committers@arkaria.postgresql.org; Tue, 27 Jul 2021 16:22:51 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m8Pr1-00080J-3B for pgsql-committers@lists.postgresql.org; Tue, 27 Jul 2021 16:22:51 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m8Pqz-00059x-2m for pgsql-committers@lists.postgresql.org; Tue, 27 Jul 2021 16:22:50 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 16RGMl1n330929; Tue, 27 Jul 2021 12:22:47 -0400 From: Tom Lane To: Simon Riggs cc: Dean Rasheed , pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Allow numeric scale to be negative or greater than precision. In-reply-to: References: Comments: In-reply-to Simon Riggs message dated "Tue, 27 Jul 2021 17:10:41 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <330927.1627402967.1@sss.pgh.pa.us> Date: Tue, 27 Jul 2021 12:22:47 -0400 Message-ID: <330928.1627402967@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Simon Riggs writes: > This is for migration? Yeah, compatibility with some other DBMSes that allow this. > Or does it mean very small values now occupy less space since we store > fewer zeros? It won't affect space consumption at all, as NUMERIC has never stored leading or trailing zeroes. (Modulo the fact that "zero" here means a base-NDIGIT digit.) regards, tom lane