[Q] The generality of extended function (in C)

Started by Seung-won Hwangover 24 years ago1 messagesgeneral
Jump to latest
#1Seung-won Hwang
shwang5@students.uiuc.edu

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.