pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Merge coding of return/exit/continue cases in plpgsql's loop sta
Date: Sun, 31 Dec 2017 22:20:46 +0000
Message-ID: <E1eVlyI-0000DY-H2@gemulon.postgresql.org> (raw)

Merge coding of return/exit/continue cases in plpgsql's loop statements.

plpgsql's five different loop control statements contained three distinct
implementations of the same (or what ought to be the same, at least)
logic for handling return/exit/continue result codes from their child
statements.  At best, that's trouble waiting to happen, and there seems
no very good reason for the coding to be so different.  Refactor so that
all the common logic is expressed in a single macro.

Discussion: https://postgr.es/m/26314.1514670401@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3e724aac74e8325fe48dac8a30c2a7974eff7a14

Modified Files
--------------
src/pl/plpgsql/src/pl_exec.c | 310 +++++++++++++------------------------------
1 file changed, 90 insertions(+), 220 deletions(-)



Message-ID: <E1eVlyI-0000DY-H2@gemulon.postgresql.org>
Permalink:  ../E1eVlyI-0000DY-H2@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1eVlyI-0000DY-H2@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Merge coding of return/exit/continue cases in plpgsql's loop sta
  In-Reply-To: <E1eVlyI-0000DY-H2@gemulon.postgresql.org>
  References: <E1eVlyI-0000DY-H2@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox