Re: Using "exit" to bring "goto" functionality.

Поиск
Список
Период
Сортировка
От Christophe Pettus
Тема Re: Using "exit" to bring "goto" functionality.
Дата
Msg-id 39EC45EE-8162-4B19-97C2-BE54E758B294@thebuild.com
обсуждение исходный текст
Ответ на Using "exit" to bring "goto" functionality.  (Bryn Llewellyn <bryn@yugabyte.com>)
Ответы Re: Using "exit" to bring "goto" functionality.
Re: Using "exit" to bring "goto" functionality.
Список pgsql-general

> On Jul 10, 2023, at 11:54, Bryn Llewellyn <bryn@yugabyte.com> wrote:
>
> What is the rationale for supporting what seems to be on its face this strange functionality?

It allows you to EXIT or CONTINUE a loop that is not the innermost one, by naming the label of an outer loop.

One can debate endlessly whether it's good or bad to include that functionality, but it definitely has use cases.  I
wouldassume that at this point, it's not going anywhere. 

The relevant documentation is here:

    https://www.postgresql.org/docs/15/plpgsql-control-structures.html#PLPGSQL-CONTROL-STRUCTURES-LOOPS


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

Предыдущее
От: Bryn Llewellyn
Дата:
Сообщение: Using "exit" to bring "goto" functionality.
Следующее
От: DAVID ROTH
Дата:
Сообщение: Re: Using "exit" to bring "goto" functionality.