pgsql: Move clause_sides_match_join() into restrictinfo.h - Mailing list pgsql-committers

From David Rowley
Subject pgsql: Move clause_sides_match_join() into restrictinfo.h
Date
Msg-id E1t0chi-000u6b-AI@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Move clause_sides_match_join() into restrictinfo.h

Two near-identical copies of clause_sides_match_join() existed in
joinpath.c and analyzejoins.c.  Deduplicate this by moving the function
into restrictinfo.h.

It isn't quite clear that keeping the inline property of this function
is worthwhile, but this commit is just an exercise in code
deduplication.  More effort would be required to determine if the inline
property is worth keeping.

Author: James Hunter <james.hunter.pg@gmail.com>
Discussion: https://postgr.es/m/CAJVSvF7Nm_9kgMLOch4c-5fbh3MYg%3D9BdnDx3Dv7Fcb64zr64Q%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/2453196107de66cff0257feef2ff8585dcf9d924

Modified Files
--------------
src/backend/optimizer/path/joinpath.c     | 44 +++++--------------------------
src/backend/optimizer/plan/analyzejoins.c | 31 ----------------------
src/include/optimizer/restrictinfo.h      | 31 ++++++++++++++++++++++
3 files changed, 38 insertions(+), 68 deletions(-)


pgsql-committers by date:

Previous
From: Masahiko Sawada
Date:
Subject: pgsql: Add contrib/pg_logicalinspect.
Next
From: Nathan Bossart
Date:
Subject: pgsql: Add type cast to foreach_internal's loop variable.