Richard Guo <guofenglinux@gmail.com> writes:
> I also think it seems better to do bms_copy in separate steps, not only
> because this keeps consistent with the existing code in
> remove_rel_from_restrictinfo, but also because we need to do
> bms_del_member twice for each lefthand/righthand relid set.
Yeah. Of course, we don't need a bms_copy() in the second one,
but that'd just add even more asymmetry and chance for confusion.
> Speaking of consistency, do you think it would improve the code's
> readability if we rearrange the code in remove_rel_from_query so that
> the modifications of the same relid set are grouped together, just like
> what we do in remove_rel_from_restrictinfo?
I left it alone, just because it didn't seem worth cluttering "git
blame" here.
regards, tom lane