Re: shadow variables - pg15 edition

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, Tomas Vondra <tomas(dot)vondra(at)postgresql(dot)org>, Peter Smith <smithpb2250(at)gmail(dot)com>
Subject: Re: shadow variables - pg15 edition
Date: 2022-08-25 02:08:39
Message-ID: 20220825020839.GT2342@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Aug 24, 2022 at 10:47:31PM +1200, David Rowley wrote:
> On Wed, 24 Aug 2022 at 14:39, Justin Pryzby <pryzby(at)telsasoft(dot)com> wrote:
> > Attached are half of the remainder of what I've written, ready for review.
>
> Thanks for the patches.

> 4. "Repurpose" (variables have the same purpose and may as well use
> the same variable)

> Would you be able to write a patch for #4.

The first of the patches that I sent yesterday was all about "repurposed" vars
from outer scope (lc, l, isnull, save_errno), and was 70% of your list of vars
to repurpose.

Here, I've included the rest of your list.

Plus another patch for vars which I'd already written patches to repurpose, but
which aren't classified as "repurpose" on your list.

For subselect.c, you could remove some more "lc" vars and re-use the "l" var
for consistency (but I suppose you won't want that).

--
Justin

Attachment Content-Type Size
v4-reuse.txt text/plain 18.9 KB
v4-reuse-more.txt text/plain 31.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2022-08-25 02:14:24 Re: pg_regress: lookup shellprog in $PATH
Previous Message David Rowley 2022-08-25 01:46:11 Re: shadow variables - pg15 edition