float8 to text converter

Started by Memphistoabout 27 years ago3 messages
#1Memphisto
szoli@netvisor.hu

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

#2Jose' Soares
jose@sferacarta.com
In reply to: Memphisto (#1)
Re: [GENERAL] float8 to text converter

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:

Show quoted text

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.

#3Memphisto
szoli@netvisor.hu
In reply to: Jose' Soares (#2)
Re: [GENERAL] float8 to text converter

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