-
- Downloads
Improving various checks by Heikki Linnakangas <heikki@enterprisedb.com>
- add code to check that the query tree is well-formed. It was indeed possible to send malformed queries in binary mode, which produced all kinds of strange results. - make the left-field a uint32. There's no reason to arbitrarily limit it to 16-bits, and it won't increase the disk/memory footprint either now that QueryOperator and QueryOperand are separate structs. - add check_stack_depth() call to all recursive functions I found. Some of them might have a natural limit so that you can't force arbitrarily deep recursions, but check_stack_depth() is cheap enough that seems best to just stick it into anything that might be a problem.
Showing
- src/backend/utils/adt/tsquery.c 51 additions, 16 deletionssrc/backend/utils/adt/tsquery.c
- src/backend/utils/adt/tsquery_cleanup.c 13 additions, 1 deletionsrc/backend/utils/adt/tsquery_cleanup.c
- src/backend/utils/adt/tsquery_rewrite.c 7 additions, 1 deletionsrc/backend/utils/adt/tsquery_rewrite.c
- src/backend/utils/adt/tsquery_util.c 31 additions, 2 deletionssrc/backend/utils/adt/tsquery_util.c
- src/backend/utils/adt/tsrank.c 5 additions, 1 deletionsrc/backend/utils/adt/tsrank.c
- src/include/tsearch/ts_type.h 9 additions, 3 deletionssrc/include/tsearch/ts_type.h
Loading
Please register or sign in to comment