Retire has_multiple_baserels() - Mailing list pgsql-hackers

From Richard Guo
Subject Retire has_multiple_baserels()
Date
Msg-id CAMbWs4_8RcSbbfs1ASZLrMuL0c0EQgXWcoLTQD8swBRY_pQQiA@mail.gmail.com
Whole thread Raw
Responses Re: Retire has_multiple_baserels()  (Aleksander Alekseev <aleksander@timescale.com>)
List pgsql-hackers
The function has_multiple_baserels() is used in set_subquery_pathlist()
to check and see if there are more than 1 base rel, by looping through
simple_rel_array[].  I think one simpler way to do that is to leverage
root->all_baserels by

    bms_membership(root->all_baserels) == BMS_MULTIPLE

all_baserels is computed in deconstruct_jointree (v16) or in
make_one_rel (v15 and earlier), both are before we generate access paths
for subquery RTEs, and it contains all base rels (but not "other" rels).
So it should be a suitable replacement.  I doubt that there would be any
measurable performance gains.  So please consider it cosmetic.

I've attached a patch to do that.  Any thoughts?

Thanks
Richard
Attachment

pgsql-hackers by date:

Previous
From: Giampaolo Capelli
Date:
Subject: Re: [PoC] run SQL over ciphertext
Next
From: Sergei Glukhov
Date:
Subject: Re: Problem, partition pruning for prepared statement with IS NULL clause.