Assorted style changes with a tiny improvement - Mailing list pgsql-hackers

From Ranier Vilela
Subject Assorted style changes with a tiny improvement
Date
Msg-id CAEudQAqup0agbSzMjSLSTn=OANyCzxENF1+HrSYnr3WyZib7=Q@mail.gmail.com
Whole thread Raw
List pgsql-hackers
Hi.

This is a series of patches to change styles, in assorted sources.
IMO, this improves a tiny bit and is worth trying.

1. Avoid dereference iss_SortSupport if it has nulls.
2. Avoid dereference plan_node_id if no dsm area.
3. Avoid dereference spill partitions if zero ntuples.
4. Avoid possible useless palloc call with zero size.
5. Avoid redundant variable initialization in foreign.
6. Check the cheap test first in ExecMain.
7. Check the cheap test first in pathkeys.
8. Delay possible expensive bms_is_empty call in sub_select.
9. Reduce some scope in execPartition.
10. Reduce some scope for TupleDescAttr array dereference.
11. Remove useless duplicate test in ruleutils.
This is already checked at line 4566.

12. Remove useless duplicate test in string_utils.
This is already checked at line 982.

best regards,
Ranier Vilela
Attachment

pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: What is a typical precision of gettimeofday()?
Next
From: Tom Lane
Date:
Subject: Re: On disable_cost