bug! in 7.1.3 (for recursion function) - Mailing list pgsql-bugs

From Zhang Xiaoming
Subject bug! in 7.1.3 (for recursion function)
Date
Msg-id 001701c14281$4b71d410$7f64a8c0@ebrigex.com
Whole thread Raw
Responses Re: bug! in 7.1.3 (for recursion function)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Hi,=20
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=3D0 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=20



*******************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 deliver=
y of
the message to such person), you may not copy or deliver this message to an=
yone.
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 con=
sent
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.

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Website, mailing list
Next
From: John Summerfield
Date:
Subject: CVS still doesn't work as described: