Re: breaking out of a loop in plpgsql
| От | Oliver Elphick |
|---|---|
| Тема | Re: breaking out of a loop in plpgsql |
| Дата | |
| Msg-id | 1118339470.27924.11.camel@localhost.localdomain обсуждение исходный текст |
| Ответ на | breaking out of a loop in plpgsql ("Celia McInnis" <celia@drmath.ca>) |
| Список | pgsql-novice |
On Thu, 2005-06-09 at 12:35 -0500, Celia McInnis wrote:
> How do I break out of a loop in plpgsql?
From the plpgsql docs:
EXIT [ label ] [ WHEN expression ];
If no label is given, the innermost loop is terminated and the
statement following END LOOP is executed next. If label is
given, it must be the label of the current or some outer level
of nested loop or block. Then the named loop or block is
terminated and control continues with the statement after the
loop's/block's corresponding END.
If WHEN is present, loop exit occurs only if the specified
condition is true, otherwise control passes to the statement
after EXIT.
EXIT can be used to cause early exit from all types of loops; it
is not limited to use with unconditional loops.
В списке pgsql-novice по дате отправления: