Re: Numeric 508 datatype - Mailing list pgsql-patches

From Tom Lane
Subject Re: Numeric 508 datatype
Date
Msg-id 7170.1133557822@sss.pgh.pa.us
Whole thread Raw
In response to Re: Numeric 508 datatype  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Numeric 508 datatype
List pgsql-patches
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Tom Lane wrote:
>> 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.

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

> Looks good.  From psql I just tried:

>     SELECT repeat('x', 4000);

> and got 4k x's, and SELECT repeat('x', 8000) returns 8k x's, so that works.

Curiouser and curiouser.  How about if you repeat 4k or 8k '1's?  If the
behavior is different for letters and digits then I'd look at the column
justification logic in psql's printing code.

            regards, tom lane

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Numeric 508 datatype
Next
From: Bruce Momjian
Date:
Subject: Re: Numeric 508 datatype