Displaying more than six digits from a real number

From: Clodoaldo Pinto <clodoaldo_pinto(at)yahoo(dot)com(dot)br>
To: pgsql-general(at)postgresql(dot)org
Subject: Displaying more than six digits from a real number
Date: 2004-12-01 23:25:28
Message-ID: 20041201232528.79113.qmail@web40913.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

The 7.4.2 manual says the precision of a real number is 6 decimal digits.

Is it possible to force the display of more than six decimal digits of a real
number whithout using to_char() or casting?

Using 7.4.2, FC2.

create table test (f4 float4) without oids;
insert into test values (4877852);
select f4, to_char(f4, 'FM9999999'), cast(f4 as int)
from test;
f4 | to_char | f4
-------------+---------+---------
4.87785e+06 | 4877852 | 4877852

Clodoaldo Pinto




_______________________________________________________
Yahoo! Acesso Grátis - Internet rápida e grátis. Instale o discador agora! http://br.acesso.yahoo.com/

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bill Kurland 2004-12-02 00:01:24 md5 checksum mismatch
Previous Message Joachim Zobel 2004-12-01 21:13:59 Re: createlang plperl fails with 8.0 beta5