From: | "Pavel Stehule" <pavel(dot)stehule(at)hotmail(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | comparing record and record problem if first rec is from function |
Date: | 2006-07-10 10:41:33 |
Message-ID: | BAY20-F2157451E1F6820AD463708F96B0@phx.gbl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hello
I have problem with expressions:
select (select row(ret_num,ret_den) from mp.x_numer(39,32)) = row(32,33);
select mp.x_numer(39,32)) = row(32,33);
both has error:
ERROR: operator does not exist: record = record
LINE 1: ...lect row(ret_num,ret_den) from mp.x_numer(39,32)) = row(32,3...
^
HINT: No operator matches the given name and argument type(s). You may need
to add explicit type casts.
CREATE OR REPLACE FUNCTION mp.x_numer(numer integer, denom integer, OUT
ret_num integer, OUT ret_den integer) AS $$
BEGIN
ret_num := numer + 1;
ret_den := denom * 2;
WHILE floor( ret_num/2 ) = ret_num/2.0 LOOP
ret_num := ret_num/2;
ret_den := ret_den/2;
END LOOP;
RETURN;
END;
$$ LANGUAGE plpgsql IMMUTABLE;
SELECT mp.x_numer(39,32); --> 5,8;
What can be problem?
I use csv version of postgresql
regards
Pavel Stehule
_________________________________________________________________
Najdete si svou lasku a nove pratele na Match.com. http://www.msn.cz/
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2006-07-10 12:20:20 | Re: pgsql-patches considered harmful |
Previous Message | Martijn van Oosterhout | 2006-07-10 09:57:59 | Re: pgsql-patches considered harmful |