GoTo statement problem

Поиск
Список
Период
Сортировка
От Dinesh Parikh
Тема GoTo statement problem
Дата
Msg-id 000d01c16367$367a71a0$f005a8c0@dinesh
обсуждение исходный текст
Список pgsql-general
Hi all,
I have a query about GoTo statement. Is postgres support goto statement or lable can be used for only Exit statement. The book on ste have no clue about this. I had searched all interactive docs for this pupose.(May be some has been left). So I want to know about its implementation . I have a sample fuction for testing this statement. but it is not working.
Function is as follows.
 
Drop function Gototest();
Create Function Gototest() Returns int4 as'
Declare
 DBFirst int2;
Begin
 DBFirst := 1;
 <<beginlabel>>
 While(DBFirst <100)
 Loop
  DBFirst := DBFirst+1;
  If(DBFirst = 5) Then
   GoTo Endlable;
  End If;
 End Loop;
 Return DBFirst;
End;
' language 'plpgsql';
Select Gototest();
 
 
Any suggesion/bugs may be benificial for me
 
Regards
Dinesh Parikh.
 

В списке pgsql-general по дате отправления:

Предыдущее
От: "Al Kirkus"
Дата:
Сообщение: Probably simple answer
Следующее
От: "Johnson, Shaunn"
Дата:
Сообщение: SQL question