pgsql: postgres_fdw: don't push ORDER BY with no vars (bug #15352)
В списке pgsql-committers по дате отправления:
| От | Andrew Gierth |
|---|---|
| Тема | pgsql: postgres_fdw: don't push ORDER BY with no vars (bug #15352) |
| Дата | |
| Msg-id | E1fuef1-0002Kf-8C@gemulon.postgresql.org обсуждение исходный текст |
| Список | pgsql-committers |
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 Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/64eed263ac474433d17f05b23df3018a38e71fca Modified Files -------------- contrib/postgres_fdw/postgres_fdw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
В списке pgsql-committers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера