Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-hackers by date

Next:From: Robert HaasDate: 2011-03-21 01:05:48
Subject: Re: Sync Rep and shutdown Re: Sync Rep v19
Previous:From: Jan UrbaƄskiDate: 2011-03-20 23:40:02
Subject: pl/python tracebacks v2

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group