pgsql: Fix crash in postgres_fdw for provably-empty remote UPDATE/DELET

2021-07-07 Thread Tom Lane
Fix crash in postgres_fdw for provably-empty remote UPDATE/DELETE. In 86dc90056, I'd written find_modifytable_subplan with the assumption that if the immediate child of a ModifyTable is a Result, it must be a projecting Result with a subplan. However, if the UPDATE or DELETE has a provably-consta

pgsql: Fix crash in postgres_fdw for provably-empty remote UPDATE/DELET

2021-07-07 Thread Tom Lane
Fix crash in postgres_fdw for provably-empty remote UPDATE/DELETE. In 86dc90056, I'd written find_modifytable_subplan with the assumption that if the immediate child of a ModifyTable is a Result, it must be a projecting Result with a subplan. However, if the UPDATE or DELETE has a provably-consta