Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fXDB2-0002ly-Pd for pgsql-docs@arkaria.postgresql.org; Sun, 24 Jun 2018 22:08:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fXDAz-0007SH-GB for pgsql-docs@arkaria.postgresql.org; Sun, 24 Jun 2018 22:08:05 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fXDAz-0007S5-7C for pgsql-docs@lists.postgresql.org; Sun, 24 Jun 2018 22:08:05 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fXDAw-0004OP-70 for pgsql-docs@lists.postgresql.org; Sun, 24 Jun 2018 22:08:03 +0000 Received: from bruce by momjian.us with local (Exim 4.84_2) (envelope-from ) id 1fXDAu-0004fT-TV; Sun, 24 Jun 2018 18:08:00 -0400 Date: Sun, 24 Jun 2018 18:08:00 -0400 From: Bruce Momjian To: claytonjsalem@gmail.com, pgsql-docs@lists.postgresql.org Subject: Re: Numeric documentation paragraph reverse argument order. Message-ID: <20180624220800.GE17816@momjian.us> References: <152967566691.1268.1062965601465200209@wrigleys.postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <152967566691.1268.1062965601465200209@wrigleys.postgresql.org> User-Agent: Mutt/1.5.23 (2014-03-12) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Fri, Jun 22, 2018 at 01:54:26PM +0000, PG Doc comments form wrote: > The following documentation comment has been logged on the website: > > Page: https://www.postgresql.org/docs/10/static/datatype-numeric.html > Description: > > This is not a correction, but a clarification. In the paragraph describing > the Numeric type, > https://www.postgresql.org/docs/10/static/datatype-numeric.html#DATATYPE-NUMERIC-DECIMAL > the description of the arguments is reversed from the order of the > arguments, i.e. scale before numeric, while the argument is numeric before > scale. My suggestion is to change the following paragraph: > > > We use the following terms below: The scale of a numeric is the count of > decimal digits in the fractional part, to the right of the decimal point. > The precision of a numeric is the total count of significant digits in the > whole number, that is, the number of digits to both sides of the decimal > point. So the number 23.5141 has a precision of 6 and a scale of 4. Integers > can be considered to have a scale of zero. > > to: > > > We use the following terms below: The precision of a numeric is the total > count of significant digits in the whole number, that is, the number of > digits to both sides of the decimal point. The scale of a numeric is the > count of decimal digits in the fractional part, to the right of the decimal > point. So the number 23.5141 has a precision of 6 and a scale of 4. Integers > can be considered to have a scale of zero. > > That way the order in the paragraph (precision, scale), matches the argument > order `NUMERIC(precision, scale)` Now that is an excellent suggestion. Change applied back through 9.3. Thanks. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + As you are, so once was I. As I am, so you will be. + + Ancient Roman grave inscription +