Re: Remove a unused argument from qual_is_pushdown_safe - Mailing list pgsql-hackers

From Richard Guo
Subject Re: Remove a unused argument from qual_is_pushdown_safe
Date
Msg-id CAMbWs48yyR8JgDa+k8P9keDn-XT8cr-zMdcp5wVEWjFLqBGygQ@mail.gmail.com
Whole thread Raw
In response to Remove a unused argument from qual_is_pushdown_safe  (Yugo NAGATA <nagata@sraoss.co.jp>)
Responses Re: Remove a unused argument from qual_is_pushdown_safe
List pgsql-hackers

On Fri, Nov 25, 2022 at 2:27 PM Yugo NAGATA <nagata@sraoss.co.jp> wrote:
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.

Thanks
Richard

pgsql-hackers by date:

Previous
From: John Naylor
Date:
Subject: Re: [PoC] Improve dead tuple storage for lazy vacuum
Next
From: Dilip Kumar
Date:
Subject: Avoid streaming the transaction which are skipped (in corner cases)