Re: Numeric 508 datatype

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-patches(at)postgresql(dot)org
Subject: Re: Numeric 508 datatype
Date: 2005-12-02 20:44:11
Message-ID: 200512022044.jB2KiBl11091@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers pgsql-patches

Alvaro Herrera wrote:
> Tom Lane wrote:
> > Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> > > Actually, no. If I cut'n paste the number from psql to
> > > cat > foo
> > > <shift> <insert>
> > > then only 4096 chars are copied. (Amusingly, I can't add a newline to
> > > ^D and close the file. I must delete one char to do that.)
> >
> > Hmm, cut buffer limitation in X or someplace? I definitely get the
> > right number of characters into the file written with \g, and what looks
> > like a reasonable number of screensful of plain psql output. If Bruce
> > is seeing the right number of dashes and the wrong number of data
> > characters in his \g output then *something* is pretty weird there.
>
> Well, I just tried the \g test and it is correct (12675 digits or so).

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.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2005-12-02 20:46:06 Re: [Fwd: Re: deadlock on the same relation]
Previous Message Tom Lane 2005-12-02 20:40:30 Re: Reduce NUMERIC size by 2 bytes, reduce max length to 508 digits

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2005-12-02 20:49:02 Re: generalizing the planner knobs
Previous Message Tom Lane 2005-12-02 20:37:56 Re: Reduce NUMERIC size by 2 bytes, reduce max length to 508 digits

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2005-12-02 20:55:46 Re: Numeric 508 datatype
Previous Message Tom Lane 2005-12-02 20:37:56 Re: Reduce NUMERIC size by 2 bytes, reduce max length to 508 digits