Re: BUG #15539: Deadcode in OpenTableList

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: bianpan2016(at)163(dot)com
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #15539: Deadcode in OpenTableList
Date: 2018-12-07 16:04:19
Message-ID: 30955.1544198659@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

=?utf-8?q?PG_Bug_reporting_form?= <noreply(at)postgresql(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2018-12-07 16:09:05 Re: BUG #15540: Use after release in ExecuteTruncateGuts
Previous Message Sergei Kornilov 2018-12-07 14:32:09 Re: BUG #15542: value too long for type character varying does not show the real parameter value