aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeModifyTable.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2015-07-26 17:44:27 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2015-07-26 17:44:27 -0400
commitfca8e59c1c582030dd7a3c870e1c3c70e8a193aa (patch)
tree0198bb6e1b7ab436be79ced12bc891b5f2716cdd /src/backend/executor/nodeModifyTable.c
parent358eaa01bf95935f9af968faf5b08d9914f6a445 (diff)
downloadpostgresql-fca8e59c1c582030dd7a3c870e1c3c70e8a193aa.tar.gz
postgresql-fca8e59c1c582030dd7a3c870e1c3c70e8a193aa.zip
Fix oversight in flattening of subqueries with empty FROM.
I missed a restriction that commit f4abd0241de20d5d6a79b84992b9e88603d44134 should have enforced: we can't pull up an empty-FROM subquery if it's under an outer join, because then we'd need to wrap its output columns in PlaceHolderVars. As the code currently stands, the PHVs end up with empty relid sets, which doesn't work (and is correctly caught by an Assert). It's possible that this could be fixed by assigning the PHVs the relid sets of the parent FromExpr/JoinExpr, but getting that to work is more complication than I care to add right now; indeed it's likely that we'll never bother, since pulling up empty-FROM subqueries is a rather marginal optimization anyway. Per report from Andreas Seltenreich. Back-patch to 9.5 where the faulty code was added.
Diffstat (limited to 'src/backend/executor/nodeModifyTable.c')
0 files changed, 0 insertions, 0 deletions