Re: Numeric 508 datatype - Mailing list pgsql-patches

From Alvaro Herrera
Subject Re: Numeric 508 datatype
Date
Msg-id 20051202200140.GC22966@surnet.cl
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 wrote:

> I tried your \g test and the file size difference is the length of the
> dashed line in the file, not the number of digits display, which are
> both 4096.  One has 12550 dashes, the other 19950 dashes.

So this is a psql bug?  I can count the correct number of chars with
SPI:


alvherre=# create or replace function factorial_length(int) returns int language plphp
alvherre-# as $$ $r = spi_exec("select factorial($args[0])");
alvherre$# $row = spi_fetch_row($r);
alvherre$# return strlen($row['factorial']); $$;

alvherre=# select factorial_length(4000);
 factorial_length
------------------
            12674
(1 fila)

alvherre=# select factorial_length(6000);
 factorial_length
------------------
            20066
(1 fila)

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: Numeric 508 datatype
Next
From: Tom Lane
Date:
Subject: Re: Numeric 508 datatype