pgsql: Move clause_sides_match_join() into restrictinfo.h

From: David Rowley <drowley(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Move clause_sides_match_join() into restrictinfo.h
Date: 2024-10-15 08:14:53
Message-ID: E1t0chi-000u6b-AI@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)hunter(dot)pg(at)gmail(dot)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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Nathan Bossart 2024-10-15 21:21:59 pgsql: Add type cast to foreach_internal's loop variable.
Previous Message Masahiko Sawada 2024-10-15 00:22:49 pgsql: Add contrib/pg_logicalinspect.