Re: maximum digits for NUMERIC

From: Noah Misch <noah(at)leadboat(dot)com>
To: Gianni Ciolli <gianni(dot)ciolli(at)2ndquadrant(dot)it>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: maximum digits for NUMERIC
Date: 2011-03-21 00:14:21
Message-ID: 20110321001421.GA14337@tornado.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Mar 11, 2011 at 11:36:14AM +0000, Gianni Ciolli wrote:
> maybe we should change the "1000 digits" here:
>
> http://developer.postgresql.org/pgdocs/postgres/datatype-numeric.html#DATATYPE-NUMERIC-DECIMAL
>
> because ISTM that up to 2^17 digits are supported (which makes more
> sense than 1000).

Agreed. The documentation is suggestive of this limit:

# CREATE TABLE n (c numeric(1001,0));
ERROR: NUMERIC precision 1001 must be between 1 and 1000
LINE 1: CREATE TABLE n (c numeric(1001,0));

However, that's indeed just a limit of the numeric typmod representation, not
the data type itself. An unqualified "numeric" column hits no such limit.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-03-21 01:05:48 Re: Sync Rep and shutdown Re: Sync Rep v19
Previous Message Jan Urbański 2011-03-20 23:40:02 pl/python tracebacks v2