FIX : teach expression walker about RestrictInfo
Вложения
В списке pgsql-hackers по дате отправления:
| От | Tomas Vondra |
|---|---|
| Тема | FIX : teach expression walker about RestrictInfo |
| Дата | |
| Msg-id | 553FC9BC.5060402@2ndquadrant.com обсуждение исходный текст |
| Ответы |
Re: FIX : teach expression walker about RestrictInfo
|
| Список | pgsql-hackers |
Hi there,
the attached trivial patch adds handling of RestrictInfo nodes into
expression_tree_walker(). This is needed for example when calling
pull_varnos or (or other functions using the expression walker) in
clausesel.c, for example. An example of a query causing errors with
pull_varnos is
select * from t where (a >= 10 and a <= 20) or (b >= 15 and b <= 20);
which gets translated into an expression tree like this:
BoolExpr [OR_EXPR]
BoolExpr [AND_EXPR]
RestrictInfo
OpExpr [Var >= Const]
RestrictInfo
OpExpr [Var <= Const]
BoolExpr [AND_EXPR]
RestrictInfo
OpExpr [Var >= Const]
RestrictInfo
OpExpr [Var <= Const]
and the nested RestrictInfo nodes make the walker fail because of
unrecognized node.
It's possible that expression walker is not supposed to know about
RestrictInfo, but I don't really see why would that be the case.
regards
--
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера