[Q] The generality of extended function (in C) - Mailing list pgsql-general

From Seung-won Hwang
Subject [Q] The generality of extended function (in C)
Date
Msg-id 01f001c1507f$92380ca0$0100a8c0@bluebird
Whole thread Raw
List pgsql-general
 
Hi,
 
I'm curious about the extended function that one can write:
 
In plpgSQL, is it possble to use math functions? (pow,sqrt,sin,cos..)
Mine gives me the following errors. Is it because mine is outdated, or is it not supported?
 
template1=# select dist(61801,61802);
ERROR:  Function 'pow(float8)' does not exist
        Unable to identify a function that satisfies the given argument types
        You may need to add explicit typecasts
 
Suppose that one use C to address this problem, is it possble to look up DB in the code
as in plpgSQL? That is, does C have the counterpart to the below code in plpgSQL ?
 
SELECT INTO zip2_rec *
FROM zip
WHERE zip=zip2;
do something on zip_rec.lon
 
Thanks.
 

pgsql-general by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Not using index on VERY simple query
Next
From: J C Lawrence
Date:
Subject: Re: