Fw: Problem Related to Goto - Mailing list pgsql-general

From Dinesh Parikh
Subject Fw: Problem Related to Goto
Date
Msg-id 007901c1480b$4e6904b0$f005a8c0@dinesh
Whole thread Raw
List 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

pgsql-general by date:

Previous
From: "Daniel M . Kurry"
Date:
Subject: Re: UNIQUE constraint and indexing
Next
From: "Dinesh Parikh"
Date:
Subject: Temporary Table Problem