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

Re: Numeric 508 datatype

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
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:01:40
Message-ID: 20051202200140.GC22966@surnet.cl (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-hackerspgsql-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.

In response to

Responses

pgsql-hackers by date

Next:From: Alvaro HerreraDate: 2005-12-02 20:05:29
Subject: Re: What`s wrong with the lists?
Previous:From: Tom LaneDate: 2005-12-02 19:53:47
Subject: Re: Numeric 508 datatype

pgsql-patches by date

Next:From: Tom LaneDate: 2005-12-02 20:06:31
Subject: Re: Numeric 508 datatype
Previous:From: Tom LaneDate: 2005-12-02 19:53:47
Subject: Re: Numeric 508 datatype

pgsql-general by date

Next:From: Gary HortonDate: 2005-12-02 20:02:22
Subject: Re: createuser ignores stdin in 8.1.0?
Previous:From: Tom LaneDate: 2005-12-02 19:53:47
Subject: Re: Numeric 508 datatype

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