Re: search_plan_tree(): handling of non-leaf CustomScanState nodes causes segfault

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

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Zhihong Yu <zyu@yugabyte.com>
Cc: David Geier <david@swarm64.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2021-01-18T20:15:54Z
Lists: pgsql-hackers
Zhihong Yu <zyu@yugabyte.com> writes:
> It seems sstate->ss_currentRelation being null can only
> occur for T_ForeignScanState and T_CustomScanState.
> What about the following change ?

Seems like more code for no very good reason.

			regards, tom lane



Commits

  1. Remove faulty support for MergeAppend plan with WHERE CURRENT OF.

  2. Avoid crash with WHERE CURRENT OF and a custom scan plan.