Re: maximum digits for NUMERIC
Bruce Momjian <bruce@momjian.us>
From: Bruce Momjian <bruce@momjian.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Noah Misch <noah@leadboat.com>, Gianni Ciolli <gianni.ciolli@2ndquadrant.it>, pgsql-hackers@postgresql.org
Date: 2011-04-26T15:58:19Z
Lists: pgsql-hackers
Attachments
- /rtmp/numeric (text/x-diff) patch
Robert Haas wrote: > On Fri, Apr 1, 2011 at 7:51 AM, Noah Misch <noah@leadboat.com> wrote: > > On Fri, Apr 01, 2011 at 11:44:23AM +0100, Gianni Ciolli wrote: > >> Please find attached v2 of the numeric-doc patch, which takes into > >> account your remarks. In particular, numeric limits are now correct > >> and documented only in that table. > > > > This version looks sound to me. ?Thank you. > > Committed. Wow, I am so glad someone documented this. I often do factorial(4000) which generates 12673 digits when teaching classes, and it bugged me that we documented the limit as 1000 digits. I had asked about improving the docs years ago and was discouraged because people thought we might someday want to limit the length to 1000. Do we want to bump up that specified limit? The attached, applied patch clarifies that it is non-precision-specified NUMERIC that has a very high range. -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. +