Re: [SQL] type conversions

From: De Moudt Walter <wdemoudt(at)planetinternet(dot)be>
To: pgsql-sql <pgsql-sql(at)postgresql(dot)org>
Cc: Baris Ulu <ulu(at)bornova(dot)ege(dot)edu(dot)tr>
Subject: Re: [SQL] type conversions
Date: 1999-11-08 04:16:26
Message-ID: 38264E9A.C817678E@planetinternet.be
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi Baris,
Think i found something for you. In pg_proc (a table you can and querry
in any postgres database - try "select * from pg_proc) i found the
following :

float4_text accepts float4 returns text
float8_text float8 text
int2_text int2 text
int4_text int4 text
int8_text int8 text
text_float4 text float4
text_float8 text float8
text_int2......
.
.
I think all these functions work with the argument between brackets ()
as any function in (almost) any language, but haven't tested them yet
though.

If You run into problems with fonctions or procedures, you should look
at this table, as well as at the pg_operator table. They are very
instructive, and speak for themselves, with some assumptions :-)

Hope it helps,

regards from Walter De Moudt
(sorry for the sloppy layout, had a drink tonight :-s)

Baris Ulu wrote:
>
> I created a function that returns a character which is
> concatanated with four or five different attributes, but one of them is
> float8 that indicates a ratio; but I hava not found a function that
> converts a floating point number to a text or char data type. What can I
> do with it(Itried to convert it as in the following 'text(int(ratio))' but
> it gives the rounded integer value of my ratio as usual...)
>
> ************

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Oliver Fischer 1999-11-08 06:58:28 Creating a index with a timestamp?
Previous Message Rich Shepard 1999-11-08 01:29:49 Specifying currency using a numeric data type