Re: maximum digits for NUMERIC - Mailing list pgsql-hackers

From Noah Misch
Subject Re: maximum digits for NUMERIC
Date
Msg-id 20110321001421.GA14337@tornado.leadboat.com
Whole thread Raw
In response to maximum digits for NUMERIC  (Gianni Ciolli <gianni.ciolli@2ndquadrant.it>)
Responses Re: maximum digits for NUMERIC
List 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.


pgsql-hackers by date:

Previous
From: Jan Urbański
Date:
Subject: pl/python tracebacks v2
Next
From: Robert Haas
Date:
Subject: Re: Sync Rep and shutdown Re: Sync Rep v19