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

Re: Numeric 508 datatype

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-patches(at)postgresql(dot)org
Subject: Re: Numeric 508 datatype
Date: 2005-12-02 20:55:46
Message-ID: 6988.1133556946@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-hackerspgsql-patches
Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> I just tested from a standalone backend:
> 	backend> select pow(10::numeric, 131071) + 1
> and got 4095 zeros and no trailing '1' (wrong), so it isn't psql, it
> must be something in the backend.

If the backend is truncating the result length, I don't see why psql
would decide it needs 12K dashes for the header.  There's something
awfully fishy going on in your machine.

Try something like

regression=# select length((pow(10::numeric, 131071))::text);
 length
--------
 131089
(1 row)

If that gives the right answer then the NUMERIC code is off the hook,
and what you've got is a strange limitation on output column length.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2005-12-02 20:59:36
Subject: Re: Numeric 508 datatype
Previous:From: Rod TaylorDate: 2005-12-02 20:51:52
Subject: Re: generalizing the planner knobs

pgsql-patches by date

Next:From: Bruce MomjianDate: 2005-12-02 20:59:36
Subject: Re: Numeric 508 datatype
Previous:From: Bruce MomjianDate: 2005-12-02 20:44:11
Subject: Re: Numeric 508 datatype

pgsql-general by date

Next:From: Bruce MomjianDate: 2005-12-02 20:59:36
Subject: Re: Numeric 508 datatype
Previous:From: Bruce MomjianDate: 2005-12-02 20:52:48
Subject: Re: createuser ignores stdin in 8.1.0?

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