Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qIw6l-00088G-Uh for pgsql-general@arkaria.postgresql.org; Mon, 10 Jul 2023 18:59:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1qIw6k-0006rh-DQ for pgsql-general@arkaria.postgresql.org; Mon, 10 Jul 2023 18:59:38 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qIw6k-0006rY-30 for pgsql-general@lists.postgresql.org; Mon, 10 Jul 2023 18:59:38 +0000 Received: from smtp123.iad3b.emailsrvr.com ([146.20.161.123]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qIw6h-0037eW-FS for pgsql-general@lists.postgresql.org; Mon, 10 Jul 2023 18:59:36 +0000 X-Auth-ID: xof@thebuild.com Received: by smtp16.relay.iad3b.emailsrvr.com (Authenticated sender: xof-AT-thebuild.com) with ESMTPSA id 2534EC0117; Mon, 10 Jul 2023 14:59:34 -0400 (EDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\)) Subject: Re: Using "exit" to bring "goto" functionality. From: Christophe Pettus In-Reply-To: <655E5E21-FCED-405F-81F6-AE2713F27337@yugabyte.com> Date: Mon, 10 Jul 2023 11:58:33 -0700 Cc: pgsql-general list Content-Transfer-Encoding: quoted-printable Message-Id: <39EC45EE-8162-4B19-97C2-BE54E758B294@thebuild.com> References: <655E5E21-FCED-405F-81F6-AE2713F27337@yugabyte.com> To: Bryn Llewellyn X-Mailer: Apple Mail (2.3608.120.23.2.7) X-Classification-ID: 244fc09f-e778-4619-9d6a-0103319c7d79-1-1 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Jul 10, 2023, at 11:54, Bryn Llewellyn wrote: >=20 > 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 that 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=