Re: [HACKERS] maximum digits for NUMERIC

2011-04-27 Thread Daniele Varrazzo
On Wed, Apr 27, 2011 at 4:47 AM, Bruce Momjian br...@momjian.us wrote: Alvaro Herrera wrote: Excerpts from Bruce Momjian's message of mar abr 26 12:58:19 -0300 2011: Wow, I am so glad someone documented this.  I often do factorial(4000) which generates 12673 digits when teaching classes,

Re: [HACKERS] maximum digits for NUMERIC

2011-04-26 Thread Bruce Momjian
Robert Haas wrote: On Fri, Apr 1, 2011 at 7:51 AM, Noah Misch n...@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

Re: [HACKERS] maximum digits for NUMERIC

2011-04-26 Thread Alvaro Herrera
Excerpts from Bruce Momjian's message of mar abr 26 12:58:19 -0300 2011: 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 keep wondering why you want to

Re: [HACKERS] maximum digits for NUMERIC

2011-04-26 Thread Bruce Momjian
Alvaro Herrera wrote: Excerpts from Bruce Momjian's message of mar abr 26 12:58:19 -0300 2011: 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 keep

Re: [HACKERS] maximum digits for NUMERIC

2011-04-03 Thread Robert Haas
On Fri, Apr 1, 2011 at 7:51 AM, Noah Misch n...@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

Re: [HACKERS] maximum digits for NUMERIC

2011-04-01 Thread Noah Misch
On Fri, Mar 25, 2011 at 06:09:54PM +, Gianni Ciolli wrote: On Fri, Mar 25, 2011 at 08:46:17AM +, Gianni Ciolli wrote: On Sun, Mar 20, 2011 at 08:14:21PM -0400, Noah Misch wrote: Agreed. The documentation is suggestive of this limit: # CREATE TABLE n (c numeric(1001,0));

Re: [HACKERS] maximum digits for NUMERIC

2011-04-01 Thread Gianni Ciolli
On Fri, Apr 01, 2011 at 03:52:22AM -0400, Noah Misch wrote: NumericLong has a 14-bit count of decimal digits for the dscale, giving that fractional digit limit. It stores the weight as a 16-bit signed count of base-1 digits after the first. For example, 10^4-1 has weight 0, 10^4 through

Re: [HACKERS] maximum digits for NUMERIC

2011-04-01 Thread Noah Misch
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. -- Sent via

Re: [HACKERS] maximum digits for NUMERIC

2011-03-25 Thread Gianni Ciolli
On Sun, Mar 20, 2011 at 08:14:21PM -0400, Noah Misch wrote: On Fri, Mar 11, 2011 at 11:36:14AM +, 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

Re: [HACKERS] maximum digits for NUMERIC

2011-03-25 Thread Gianni Ciolli
On Fri, Mar 25, 2011 at 08:46:17AM +, Gianni Ciolli wrote: On Sun, Mar 20, 2011 at 08:14:21PM -0400, Noah Misch wrote: 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:

Re: [HACKERS] maximum digits for NUMERIC

2011-03-20 Thread Noah Misch
On Fri, Mar 11, 2011 at 11:36:14AM +, 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

[HACKERS] maximum digits for NUMERIC

2011-03-11 Thread Gianni Ciolli
Hi, 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). Best regards, Dr. Gianni Ciolli - 2ndQuadrant Italia

Re: [HACKERS] maximum digits for NUMERIC

2011-03-11 Thread Tom Lane
Gianni Ciolli gianni.cio...@2ndquadrant.it writes: 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 This is incorrect. (You're confusing the

Re: [HACKERS] maximum digits for NUMERIC

2011-03-11 Thread Gianni Ciolli
On Fri, Mar 11, 2011 at 09:38:03AM -0500, Tom Lane wrote: Gianni Ciolli gianni.cio...@2ndquadrant.it writes: 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