Re: Is there a GoTo ?

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: Is there a GoTo ?
Дата
Msg-id 872cd0ac-1edc-2c75-290e-1ab88138684f@aklaver.com
обсуждение исходный текст
Ответ на Is there a GoTo ?  (İlyas Derse <ilyasderse@gmail.com>)
Список pgsql-general
On 1/16/20 2:48 AM, İlyas Derse wrote:
> In this function I have to GOTO to a label1, but GOTO keyword is not 
> working, can you please help me in getting the way from which I am able 
> to jump from a particular code to label.
>   Thanks...
> 
> |CREATEORREPLACE FUNCTIONtest(i integer)RETURNS integer 
> AS$$BEGINIFi<0THENRETURNi 
> +1;ELSEGOTOlabel1;ENDIF<<label1>>RETURNnull;END;$$LANGUAGE plpgsql;|
> 

Are you looking for EXIT?:

https://www.postgresql.org/docs/12/plpgsql-control-structures.html#PLPGSQL-CONDITIONALS
42.6.5.2. EXIT

-- 
Adrian Klaver
adrian.klaver@aklaver.com



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

Предыдущее
От: Michael Nolan
Дата:
Сообщение: Re: Can I do this?
Следующее
От: Justin
Дата:
Сообщение: Re: Can I do this?