forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitbf2d046
committed
postgres_fdw: don't push ORDER BY with no vars (bug #15352)
Commitaa09cd2 changed a condition in find_em_expr_for_rel frombeing a bms_equal comparison of relids to bms_is_subset, in order tosupport order by clauses on foreign joins. But this also allowsthrough the degenerate case of expressions with no Vars at all (andhence empty relids), including integer constants which will be parsedunexpectedly on the remote (viz. "ERROR: ORDER BY position 0 is not inselect 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.org1 parentbfea331 commitbf2d046
1 file changed
+2
-1
lines changedLines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5793 | 5793 |
| |
5794 | 5794 |
| |
5795 | 5795 |
| |
5796 |
| - | |
| 5796 | + | |
| 5797 | + | |
5797 | 5798 |
| |
5798 | 5799 |
| |
5799 | 5800 |
| |
|
0 commit comments
Comments
(0)