Re: patch: remove redundant code from pl_exec.c

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: patch: remove redundant code from pl_exec.c
Date: 2010-12-17 15:24:17
Message-ID: AANLkTi=ea+h_io3QM3zhECy=YyJVVTEcDXE-O45gi9Cb@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2010/12/17 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> Pavel Stehule <pavel(dot)stehule(at)gmail(dot)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
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2010-12-17 15:24:48 Re: proposal: FOREACH-IN-ARRAY (probably for 9.2?)
Previous Message Tom Lane 2010-12-17 15:22:41 Re: Unnecessary limit on max_standby_streaming_delay