Fw: Problem Related to Goto

Поиск
Список
Период
Сортировка
От Dinesh Parikh
Тема Fw: Problem Related to Goto
Дата
Msg-id 007901c1480b$4e6904b0$f005a8c0@dinesh
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: "Daniel M . Kurry"
Дата:
Сообщение: Re: UNIQUE constraint and indexing
Следующее
От: "Dinesh Parikh"
Дата:
Сообщение: Temporary Table Problem