Re: patch: remove redundant code from pl_exec.c - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: patch: remove redundant code from pl_exec.c
Date
Msg-id AANLkTi=ea+h_io3QM3zhECy=YyJVVTEcDXE-O45gi9Cb@mail.gmail.com
Whole thread Raw
In response to Re: patch: remove redundant code from pl_exec.c  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: patch: remove redundant code from pl_exec.c  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
2010/12/17 Tom Lane <tgl@sss.pgh.pa.us>:
> Pavel Stehule <pavel.stehule@gmail.com> writes:
>> This patch remove redundant rows from PL/pgSQL executor (-89 lines).
>> Doesn't change a functionality.
>
> I'm not really impressed with this idea: there's no a priori reason
> that all those loop types would necessarily have exactly the same
> control logic.
>

this code processes a rc from EXIT, CONTINUE and RETURN statement. All
these statements are defined independent to outer loops, so there are
no reason why this code has be different. And actually removed code
was almost same. There was different a process for FOR statement,
because there isn't possible direct "return" from cycle, because is
necessary to release a allocated memory.

There is no reason why the processing should be same, but actually is same.


>                        regards, tom lane
>


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: proposal: FOREACH-IN-ARRAY (probably for 9.2?)
Next
From: Tom Lane
Date:
Subject: Re: bug in SignalSomeChildren