From: | "Dinesh Parikh" <dineshp(at)newgen(dot)co(dot)in> |
---|---|
To: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Fw: Problem Related to Goto |
Date: | 2001-09-28 10:49:53 |
Message-ID: | 007901c1480b$4e6904b0$f005a8c0@dinesh |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Dear All
I have a strange problem. Some documents suggests that I can use Goto statement. My program is like this one.
Drop function Gototest();
Create Function Gototest() Returns int4 as'
Declare
DBFirst int2;
Begin
DBFirst := 1;
Start: DBFirst:= DBFirst+1;
If (DBFirst != 10) Then
Goto Start;
End If;
Raise Notice ''val %'',DBFirst;
Return DBFirst;
End;
' language 'plpgsql';
Select Gototest();
But when I am running it , it gives error
DROP
CREATE
ERROR: parser: parse error at or near "start"
What may be cause of it. Actually I am converting oracle stored procedure to postgres function.So what is alternate.Is there any support of Continue statement.
Thanks
Regards
Dinesh Parikh
From | Date | Subject | |
---|---|---|---|
Next Message | Ben-Nes Yonatan | 2001-09-28 11:23:26 | boolean query |
Previous Message | Dinesh Parikh | 2001-09-28 10:47:47 | Dynamic Query problem |