pgsql: Fix mishandling of OLD/NEW references in subqueries in rule acti
В списке pgsql-committers по дате отправления:
| От | Dean Rasheed |
|---|---|
| Тема | pgsql: Fix mishandling of OLD/NEW references in subqueries in rule acti |
| Дата | |
| Msg-id | E1pVvtH-000exz-Se@gemulon.postgresql.org обсуждение |
| Список | pgsql-committers |
Fix mishandling of OLD/NEW references in subqueries in rule actions. If a rule action contains a subquery that refers to columns from OLD or NEW, then those are really lateral references, and the planner will complain if it sees such things in a subquery that isn't marked as lateral. However, at rule-definition time, the user isn't required to mark the subquery with LATERAL, and so it can fail when the rule is used. Fix this by marking such subqueries as lateral in the rewriter, at the point where they're used. Dean Rasheed and Tom Lane, per report from Alexander Lakhin. Back-patch to all supported branches. Discussion: https://postgr.es/m/5e09da43-aaba-7ea7-0a51-a2eb981b058b%40gmail.com Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/39ad791e851022bc88feca4637118e7b589f5f3a Modified Files -------------- src/backend/rewrite/rewriteHandler.c | 22 ++++++++++++++++++---- src/test/regress/expected/rules.out | 25 +++++++++++++++++++++++++ src/test/regress/sql/rules.sql | 17 +++++++++++++++++ 3 files changed, 60 insertions(+), 4 deletions(-)
В списке pgsql-committers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера