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

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 (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-hackerspgsql-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

pgsql-hackers by date

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

pgsql-patches by date

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

pgsql-general by date

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

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