bug! in 7.1.3 (for recursion function)

From: "Zhang Xiaoming" <xiaoming(dot)zhang(at)ebridgex(dot)com>
To: <pgsql-hackers(at)postgresql(dot)org>
Subject: bug! in 7.1.3 (for recursion function)
Date: 2001-09-21 09:35:47
Message-ID: 000c01c14280$cb03b730$7f64a8c0@ebrigex.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2001-09-21 10:40:01 Re: Multibyte regression tests broken?
Previous Message Karel Zak 2001-09-21 08:35:40 Re: Multibyte regression tests broken?