Re: Proposal - Continue stmt for PL/pgSQL
От | Pavel Stehule |
---|---|
Тема | Re: Proposal - Continue stmt for PL/pgSQL |
Дата | |
Msg-id | Pine.LNX.4.44.0506162124420.13602-100000@kix.fsv.cvut.cz обсуждение исходный текст |
Ответ на | Re: Proposal - Continue stmt for PL/pgSQL (Andrew Dunstan <andrew@dunslane.net>) |
Список | pgsql-hackers |
> > Well, yes, but I don't think we should break compatibility > arbitrarilly. I guess it could be argued that this is a missing feature > in PL/SQL and its Ada parent - implementing GOTO just to handle this > case seems unnecessary. Yes. I din't use goto 5 years :-). Continue stmt is more cleaner and readable. now: FOR i IN 1 .. 100 LOOP continue := true WHILE continue LOOP ... EXIT; -- contine continue :=false; -- really exit END LOOP; END LOOP; with continue FOR i IN 1 .. 100 LOOP ... EXIT WHEN .. CONTINUE WHEN .. END LOOP; One argument for continue inside begin block - for discussion only. on loop exit means break iteration, continue new iteration. Continue and Exit are symmetric. I didn't know ADA haven't continue. In PL/pgSQL there isn't any problem implement continue stmt (wit any face), but goto stmt means relative big changes in source code. Pavel > > I agree with Tom that it should only be allowed inside a loop. > > cheers > > andrew > > ---------------------------(end of broadcast)--------------------------- > TIP 7: don't forget to increase your free space map settings >
В списке pgsql-hackers по дате отправления: