summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Gierth <rhodiumtoad@postgresql.org>2018-08-28 14:43:51 +0100
committerAndrew Gierth <rhodiumtoad@postgresql.org>2018-08-28 15:04:30 +0100
commit639bdbb96fed7f8975111bf8081172fd8c7f623d (patch)
tree6e2e4d79852a5baa58f4b708358320a22f97f865 /src
parent450b247415125e08821dfbb68b0a15a4f0f7eb22 (diff)
postgres_fdw: don't push ORDER BY with no vars (bug #15352)
Commit aa09cd242 changed a condition in find_em_expr_for_rel from being a bms_equal comparison of relids to bms_is_subset, in order to support order by clauses on foreign joins. But this also allows through the degenerate case of expressions with no Vars at all (and hence empty relids), including integer constants which will be parsed unexpectedly on the remote (viz. "ERROR: ORDER BY position 0 is not in select list" as in the bug report). Repair by adding an additional !bms_is_empty test. Backpatch through to 9.6 where the aforementioned change was made. Per bug #15352 from Maksym Boguk; analysis and patch by me. Discussion: https://postgr.es/m/153518420278.1478.14875560810251994661@wrigleys.postgresql.org
Diffstat (limited to 'src')
0 files changed, 0 insertions, 0 deletions