Re: Remove unnecessary else branch - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Remove unnecessary else branch
Date
Msg-id 3438915.1602602703@sss.pgh.pa.us
Whole thread Raw
In response to Re: Remove unnecessary else branch  (Li Japin <japinli@hotmail.com>)
List pgsql-hackers
Li Japin <japinli@hotmail.com> writes:
> I agree with Heikki from the code execution point of view.

> In code execution point of view they are same, however, the code is for user, i think the readability is also
important.

There is another consideration here, which is avoiding creating
back-patching hazards from gratuitous cross-branch code differences.

If you need to rewrite a chunk of logic anyway, then fixing
small cosmetic issues in it is fine.  Otherwise I think "leave
well enough alone" is a good guiding principle.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Assertion failure with LEFT JOINs among >500 relations
Next
From: Heikki Linnakangas
Date:
Subject: Re: partition routing layering in nodeModifyTable.c