Re: BUG #15539: Deadcode in OpenTableList

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: bianpan2016@163.com
Cc: pgsql-bugs@lists.postgresql.org
Date: 2018-12-07T16:04:19Z
Lists: pgsql-bugs
=?utf-8?q?PG_Bug_reporting_form?= <noreply@postgresql.org> writes:
> The function OpenTableList performs the condition check " if
> (list_member_oid(relids, childrelid))" twice. The second condition will
> always evaluate to FALSE. As a result, the code (i.e., heap_close) on the
> true branch of the second condition check is deadcode.

Yeah, you're right.  I wonder whether we should've expected Coverity
to notice that.

Fix pushed, thanks for the report!

			regards, tom lane


Commits

  1. Clean up sloppy coding in publicationcmds.c's OpenTableList().