Fix nested NOT operation cleanup in tsquery.
Teodor Sigaev <teodor@sigaev.ru>
Fix nested NOT operation cleanup in tsquery. During normalization of tsquery tree it tries to simplify nested NOT operations but there it's obvioulsy missed that subsequent node could be a leaf node (value node) Bug #14245: Segfault on weird to_tsquery Reported by David Kellum.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/utils/adt/tsquery_cleanup.c | modified | +7 −1 |
| src/test/regress/expected/tsearch.out | modified | +12 −0 |
| src/test/regress/sql/tsearch.sql | modified | +3 −0 |