Mail about typecast - Mailing list pgsql-sql

From Vikrant Rathore
Subject Mail about typecast
Date
Msg-id 3765C5B3.C05DC56D@chemquick.com
Whole thread Raw
Responses Re: [SQL] Mail about typecast  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
Dear friends,
   I want to run a query :

vikrant=> select date_part('epoch','12 hours'::timespan)::float4;
It returns a error message
ERROR:  function dtof(float8) does not exist

But i want to use typecast since the result of this query will be used
to update a field of type float4.

I have checked the pg_proc system table it has a function dtof with
float8 as argument i have checked the list of functions also and
'dtof(float8)' is shown in that list also.
can anyone solve this problem. I can solve the problem by using a c
program but i want to know when the function dtof(float8) is there in
pg_proc table then why it is not doing a typecasting.
Thanks in advance for your kind suggestion.

Thanks & regards,
Vikrant.



pgsql-sql by date:

Previous
From: Fomichev Michael
Date:
Subject: Re: [ADMIN] Apache authentication & PostgreSQL
Next
From: Michael Olivier
Date:
Subject: example of trigger to track DB changes