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

From Stephen Frost
Subject Re: REVIEW: patch: remove redundant code from pl_exec.c
Date
Msg-id 20110119203645.GP4933@tamriel.snowman.net
Whole thread Raw
In response to Re: REVIEW: patch: remove redundant code from pl_exec.c  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: REVIEW: patch: remove redundant code from pl_exec.c  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
* Tom Lane (tgl@sss.pgh.pa.us) wrote:
> I think we should reject this one.

Works for me.

> Using a switch there is a bit problematic since in some cases you want
> to use "break" to exit the loop.  We could replace such breaks by gotos,
> but that would be another strike against the argument that you're making
> things more readable.  I think the switch in exec_stmt_loop is only
> workable because it has no cleanup to do, so it can just "return" in
> places where a loop break would otherwise be needed.  In short: if you
> want to make these all look alike, better to go the other way.

Ah, yeah, good point.  We do use gotos elsewhere for this reason, might
consider revisiting those also, if we're trying to a 'clean-up' patch.
In any case, I'll mark this as rejected.
Thanks!
    Stephen

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: REVIEW: patch: remove redundant code from pl_exec.c
Next
From: Tom Lane
Date:
Subject: Re: Extending opfamilies for GIN indexes