A wrong comment about search_indexed_tlist_for_var

Richard Guo <guofenglinux@gmail.com>

From: Richard Guo <guofenglinux@gmail.com>
To: PostgreSQL-development <pgsql-hackers@postgresql.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2023-12-01T11:12:34Z
Lists: pgsql-hackers
The comment of search_indexed_tlist_for_var says:

 * In debugging builds, we cross-check the varnullingrels of the subplan
 * output Var based on nrm_match.

However, this cross-check will also be performed in non-debug builds
ever since commit 867be9c07, which converts this check from Asserts to
test-and-elog.  The commit message there also says:

    Committed separately with the idea that eventually we'll revert
    this.  It might be awhile though.

I wonder if now is the time to revert it, since there have been no
related bugs reported for quite a while.  Otherwise I think we may need
to revise the comment of search_indexed_tlist_for_var to clarify that
the cross-check is not limited to debugging builds.

Please note that if we intend to revert commit 867be9c07, we need to
revert 69c430626 too.

Thanks
Richard

Commits

  1. Fix comment about cross-checking the varnullingrels

  2. Convert nullingrels match checks from Asserts to test-and-elog.