diff options
author | Teodor Sigaev <teodor@sigaev.ru> | 2007-02-12 14:18:43 +0000 |
---|---|---|
committer | Teodor Sigaev <teodor@sigaev.ru> | 2007-02-12 14:18:43 +0000 |
commit | 0652254108dc6607e26a200b7fcc06cfb932357d (patch) | |
tree | f30637b7881080902d1194774dfed8f1101168ef | |
parent | 36149aac15a3423e0bd10f106d4267b592194f81 (diff) | |
download | postgresql-0652254108dc6607e26a200b7fcc06cfb932357d.tar.gz postgresql-0652254108dc6607e26a200b7fcc06cfb932357d.zip |
Fix backend crash in parsing incorrect tsquery.
Per report from Jon Rosebaugh <jon@inklesspen.com>
-rw-r--r-- | contrib/tsearch2/query.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/contrib/tsearch2/query.c b/contrib/tsearch2/query.c index 28d1b1dc56d..2e501210274 100644 --- a/contrib/tsearch2/query.c +++ b/contrib/tsearch2/query.c @@ -142,12 +142,14 @@ gettoken_query(QPRS_STATE * state, int4 *val, int4 *lenval, char **strval, int2 { (state->buf)++; *val = (int4) '!'; + state->state = WAITOPERAND; return OPR; } else if (*(state->buf) == '(') { state->count++; (state->buf)++; + state->state = WAITOPERAND; return OPEN; } else if (*(state->buf) == ':') |