diff options
Diffstat (limited to 'contrib/tsearch2/query.h')
-rw-r--r-- | contrib/tsearch2/query.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/tsearch2/query.h b/contrib/tsearch2/query.h index 9eff69cc719..b4d586a684b 100644 --- a/contrib/tsearch2/query.h +++ b/contrib/tsearch2/query.h @@ -4,7 +4,7 @@ #define BS_DEBUG */ - +#include "ts_locale.h" /* * item in polish notation with back link * to left operand @@ -38,7 +38,7 @@ typedef struct #define GETQUERY(x) (ITEM*)( (char*)(x)+HDRSIZEQT ) #define GETOPERAND(x) ( (char*)GETQUERY(x) + ((QUERYTYPE*)(x))->size * sizeof(ITEM) ) -#define ISOPERATOR(x) ( (x)=='!' || (x)=='&' || (x)=='|' || (x)=='(' || (x)==')' ) +#define ISOPERATOR(x) ( pg_mblen(x)==1 && ( *(x)=='!' || *(x)=='&' || *(x)=='|' || *(x)=='(' || *(x)==')' ) ) #define END 0 #define ERR 1 |