| From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
|---|---|
| To: | Bryn Llewellyn <bryn(at)yugabyte(dot)com> |
| Cc: | pgsql-general list <pgsql-general(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Using "exit" to bring "goto" functionality. |
| Date: | 2023-07-10 20:52:12 |
| Message-ID: | CAFj8pRB9+D8GwPUigiw_Xw2vbY1rMSDuVY-vRTf1zh4VfnCU-Q@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Hi
> As it happens, Oracle's PL/SQL has a "goto" statement. But PL/pgSQL does
> not. (I assume that this is because "goto" is considered a bad thing.) But
> PL/SQL programmers do use it. However, the doc section:
>
The reason why PL/pgSQL has not "goto" statement is mainly technological.
PL/pgSQL is an interpreter of high level commands. For this kind of
interpreter the "goto" - unstructured jump cannot be effectively
implemented. PL/pgSQL is very simple, and relatively fast (expressions are
slow due evaluation by SQL executor), but "goto" cannot be implemented
there. Interpreter of PL/pgSQL is very different from the more usual p-code
interpreter
Regards
Pavel
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bryn Llewellyn | 2023-07-10 21:17:46 | Re: Using "exit" to bring "goto" functionality. |
| Previous Message | Bryn Llewellyn | 2023-07-10 20:26:01 | Re: Using "exit" to bring "goto" functionality. |