From: | "Dinesh Parikh" <dineshp(at)newgen(dot)co(dot)in> |
---|---|
To: | <pgsql-general(at)postgresql(dot)org> |
Subject: | GoTo statement problem |
Date: | 2001-11-02 06:25:48 |
Message-ID: | 000d01c16367$367a71a0$f005a8c0@dinesh |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Edward Smirnov | 2001-11-02 06:46:07 | PostgresDAC ver.1.8: Delphi/C++Builder BDE replacement |
Previous Message | Johnson, Shaunn | 2001-11-02 01:17:16 | SQL question |