Re: maximum digits for NUMERIC

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Noah Misch <noah(at)leadboat(dot)com>, Gianni Ciolli <gianni(dot)ciolli(at)2ndquadrant(dot)it>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: maximum digits for NUMERIC
Date: 2011-04-26 15:58:19
Message-ID: 201104261558.p3QFwJP20006@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas wrote:
> On Fri, Apr 1, 2011 at 7:51 AM, Noah Misch <noah(at)leadboat(dot)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(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

Attachment Content-Type Size
/rtmp/numeric text/x-diff 903 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-04-26 16:28:20 Re: Bad COMPACT_ALLOC_CHUNK size in tsearch/spell.c?
Previous Message Bruce Momjian 2011-04-26 15:40:25 Re: Sync Rep v19