Re: Executor code - found an instance of a WHILE that should just be an IF

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Greg Nancarrow <gregn4422(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Executor code - found an instance of a WHILE that should just be an IF
Date: 2021-05-10 11:49:43
Message-ID: CAApHDvq-Guz65T7V5Vctxne-L=s2LpLtvJroucW_EH83Mc=esg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 10 May 2021 at 21:16, Greg Nancarrow <gregn4422(at)gmail(dot)com> wrote:
> During debugging I noticed some code in ExecResult() where a WHILE
> loop is being used with an unconditional RETURN at the end of the
> block (which is intentional, looking at the history of changes), but
> now there's no actual use of the loop in any way. The code should
> probably be changed to just use IF for clarity.
> I've attached a patch.

Looks like leftovers from ea15e1867.

I don't think this will affect any code generation but you are right,
it should be an "if".

David

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2021-05-10 11:50:14 Re: PG 14 release notes, first draft
Previous Message Antonin Houska 2021-05-10 11:48:10 Re: [PATCH] Full support for index LP_DEAD hint bits on standby