pgsql: Fix bogus tree-flattening logic in QTNTernary().
В списке pgsql-committers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | pgsql: Fix bogus tree-flattening logic in QTNTernary(). |
| Дата | |
| Msg-id | E1c0vj6-0005N9-FI@gemulon.postgresql.org обсуждение |
| Список | pgsql-committers |
Fix bogus tree-flattening logic in QTNTernary(). QTNTernary() contains logic to flatten, eg, '(a & b) & c' into 'a & b & c', which is all well and good, but it tries to do that to NOT nodes as well, so that '!!a' gets changed to '!a'. Explicitly restrict the conversion to be done only on AND and OR nodes, and add a test case illustrating the bug. In passing, provide some comments for the sadly naked functions in tsquery_util.c, and simplify some baroque logic in QTNFree(), which I think may have been leaking some items it intended to free. Noted while investigating a complaint from Andreas Seltenreich. Back-patch to all supported versions. Branch ------ REL9_4_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/f0c2ce45e7acb38d56cf62ef8c907bb690e84cb1 Modified Files -------------- src/backend/utils/adt/tsquery_util.c | 81 ++++++++++++++++++++++++++--------- src/test/regress/expected/tsearch.out | 7 +++ src/test/regress/sql/tsearch.sql | 2 + 3 files changed, 69 insertions(+), 21 deletions(-)
В списке pgsql-committers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера