Re: Using "exit" to bring "goto" functionality. - Mailing list pgsql-general

From DAVID ROTH
Subject Re: Using "exit" to bring "goto" functionality.
Date
Msg-id 417293360.172884.1689016086131@connect.xfinity.com
Whole thread Raw
In response to Re: Using "exit" to bring "goto" functionality.  (Christophe Pettus <xof@thebuild.com>)
Responses Re: Using "exit" to bring "goto" functionality.  (Adrian Klaver <adrian.klaver@aklaver.com>)
List pgsql-general
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.



> On 07/10/2023 2:58 PM EDT Christophe Pettus <xof@thebuild.com> wrote:
> 
>  
> > 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 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
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 by date:

Previous
From: Christophe Pettus
Date:
Subject: Re: Using "exit" to bring "goto" functionality.
Next
From: Adrian Klaver
Date:
Subject: Re: Using "exit" to bring "goto" functionality.