Re: Remove a unused argument from qual_is_pushdown_safe

From: Richard Guo <guofenglinux(at)gmail(dot)com>
To: Yugo NAGATA <nagata(at)sraoss(dot)co(dot)jp>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Remove a unused argument from qual_is_pushdown_safe
Date: 2022-11-25 08:05:13
Message-ID: CAMbWs48yyR8JgDa+k8P9keDn-XT8cr-zMdcp5wVEWjFLqBGygQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Nov 25, 2022 at 2:27 PM Yugo NAGATA <nagata(at)sraoss(dot)co(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip Kumar 2022-11-25 08:05:24 Avoid streaming the transaction which are skipped (in corner cases)
Previous Message John Naylor 2022-11-25 08:00:16 Re: [PoC] Improve dead tuple storage for lazy vacuum