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