Thread: float8 to text converter

float8 to text converter

From
Memphisto
Date:
Hi,

 I'd like to know if there's an operator that converts from float8 to
text. It should be because PGSQL can print a float8 number.


--------------------------------------------------------------------------------
Sebestyén Zoltán AKA Memphisto        It all seems so stupid,
                    it makes me want to give up.
szoli@netvisor.hu            But why should I give up,
                                        when it all seems so stupid?

MAKE INSTALL NOT WAR            And please avoid Necrosoft Widows



Re: [GENERAL] float8 to text converter

From
"Jose' Soares"
Date:
Hi Memphisto,

If you are using v6.4 you can use CAST as:

prova=> select cast('1.7976931348623e+308'::float8 as text);
?column?
--------------------
1.7976931348623e+308
(1 row)

or:

prova=> select cast(f as text) from a;
text
----------------------
4714-11--2147483624 BC  <---
4714-11--2147483624 BC  <---
(2 rows)

Ooops! that seems like a bug.

prova=> select f from a;
f
--------------------
1.7976931348623e+308
1.7976931348623e+308
(2 rows)

Jose'

Memphisto wrote:
>
> Hi,
>
>  I'd like to know if there's an operator that converts from float8 to
> text. It should be because PGSQL can print a float8 number.
>

Re: [GENERAL] float8 to text converter

From
Memphisto
Date:
On Tue, 3 Nov 1998, Jose' Soares wrote:

> Hi Memphisto,
>
> If you are using v6.4 you can use CAST as:
6.4 is in beta, isn't it(currently i use 6.3.2)? Anyway thanks.


--------------------------------------------------------------------------------
Sebestyén Zoltán AKA Memphisto        It all seems so stupid,
                    it makes me want to give up.
szoli@netvisor.hu            But why should I give up,
                                        when it all seems so stupid?

MAKE INSTALL NOT WAR            And please avoid Necrosoft Widows