Skip site navigation (1) Skip section navigation (2)

Fw: Problem Related to Goto

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 (view raw or flat)
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

pgsql-general by date

Next:From: Ben-Nes YonatanDate: 2001-09-28 11:23:26
Subject: boolean query
Previous:From: Dinesh ParikhDate: 2001-09-28 10:47:47
Subject: Dynamic Query problem

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group