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

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: DAVID ROTH <adaptron(at)comcast(dot)net>, Christophe Pettus <xof(at)thebuild(dot)com>, 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 19:29:47
Message-ID: 26cb1164-defa-3a84-b2b2-fe22092d9654@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 7/10/23 12:08, DAVID ROTH wrote:
> I am a newbe at my current job.
> They have a separate log table for every table because they want all the columns.
> I have been looking for a way to go to a common log table without requiring major changes to the application.
>
> With your help, I have a proof of principle that I can demonstrate now.

FYI, you replied to the wrong thread.

>
>
>
>> On 07/10/2023 2:58 PM EDT Christophe Pettus <xof(at)thebuild(dot)com> wrote:
>>
>>
>>> On Jul 10, 2023, at 11:54, Bryn Llewellyn <bryn(at)yugabyte(dot)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 thaIt 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 would assume 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
>
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2023-07-10 19:38:45 Re: Need Help On Upgrade
Previous Message DAVID ROTH 2023-07-10 19:08:05 Re: Using "exit" to bring "goto" functionality.