GoTo statement problem - Mailing list pgsql-general

From Dinesh Parikh
Subject GoTo statement problem
Date
Msg-id 000d01c16367$367a71a0$f005a8c0@dinesh
Whole thread Raw
List 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 by date:

Previous
From: "Al Kirkus"
Date:
Subject: Probably simple answer
Next
From: "Johnson, Shaunn"
Date:
Subject: SQL question