I found that qual_is_pushdown_safe() has an argument "subquery" that is not used in the function. This argument has not been referred to since the commit 964c0d0f80e485dd3a4073e073ddfd9bfdda90b2.
I think we can remove this if there is no special reason.
+1. In 964c0d0f the checks in qual_is_pushdown_safe() that need to reference 'subquery' were moved to subquery_is_pushdown_safe(), so param 'subquery' is not used any more. I think we can just remove it.
I wonder if we need to revise the comment atop qual_is_pushdown_safe() too which says
* rinfo is a restriction clause applying to the given subquery (whose RTE * has index rti in the parent query).
since there is no 'given subquery' after we remove it from the params.