diff options
author | Tom Lane | 2021-07-07 19:21:25 +0000 |
---|---|---|
committer | Tom Lane | 2021-07-07 19:21:25 +0000 |
commit | b9734c13f168ef0d487aa122e486ca9b6dd6aa59 (patch) | |
tree | 0076995b29ba2dd520431156e29b276d7c56d8fb /src/backend/rewrite/rewriteDefine.c | |
parent | 9d2a7757347cb1adb48599fce4dcde0f1fc9e9ae (diff) |
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/[email protected]
Diffstat (limited to 'src/backend/rewrite/rewriteDefine.c')
0 files changed, 0 insertions, 0 deletions