bug! in 7.1.3 (for recursion function)

From: "Zhang Xiaoming" <xiaoming(dot)zhang(at)ebridgex(dot)com>
To: <pgsql-bugs(at)postgresql(dot)org>
Subject: bug! in 7.1.3 (for recursion function)
Date: 2001-09-21 09:39:22
Message-ID: 001701c14281$4b71d410$7f64a8c0@ebrigex.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,
please run below recursion function in 7.1.3
-----------------------------------------------------------
drop function listTest(int4);
create function listTest(int4)
returns text
as 'declare
mtype alias for $1;
begin
if mtype=0 then
return ''0'';
else
return mtype||listTest(mtype-1);
end if;
end;'
language 'plpgsql';
select listTest(5);
--------------------------------------
response:

111110 (in 7.1.3, incorrenct!)

543210 (in 7.0.3, correct!)

Please tell me how to slove this problem if I don't want to go back to 7.0.3.

Thanks
Xiaoming

*******************Internet Email Confidentiality Footer*******************
Privileged/Confidential Information may be contained in this message. If you
are not the addressee indicated in this message (or responsible for delivery of
the message to such person), you may not copy or deliver this message to anyone.
In such case, you should destroy this message and kindly notify the sender by
reply email. Please advise immediately if you or your employer does not consent
to Internet email for messages of this kind. Opinions, conclusions and other
information in this message that do not relate to the official business of my
firm shall be understood as neither given nor endorsed by it.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message pgsql-bugs 2001-09-21 15:58:58 Bug #465: Program terminates with "Broken pipe" after PQexec (...)
Previous Message pgsql-bugs 2001-09-21 01:09:38 Bug #464: To uKanjiv