diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2021-07-07 15:21:25 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2021-07-07 15:21:25 -0400 |
commit | 30a35bca3f9306f87ca8db095ddac2ba62156934 (patch) | |
tree | c480327fb0ce2385cfc6c9fb2f7e05ac6e8405ad /src/backend/utils/adt/array_selfuncs.c | |
parent | e48f2afee631be42739e50fbefd758503e8dcf82 (diff) | |
download | postgresql-30a35bca3f9306f87ca8db095ddac2ba62156934.tar.gz postgresql-30a35bca3f9306f87ca8db095ddac2ba62156934.zip |
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-constant-false WHERE clause, that's not so: we'll
generate a dummy subplan with a childless Result. Add the missing
null-check so we don't crash on such cases.
Per report from Alexander Pyhalov.
Discussion: https://postgr.es/m/b9a6f53549456b2f3e2fd150dcd79d72@postgrespro.ru
Diffstat (limited to 'src/backend/utils/adt/array_selfuncs.c')
0 files changed, 0 insertions, 0 deletions