diff options
author | Bruce Momjian <bruce@momjian.us> | 2005-11-22 18:23:31 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2005-11-22 18:23:31 +0000 |
commit | bef7764835725e5d8468da1c139e9020be689b95 (patch) | |
tree | 71075b16ab6ed5152b31757e5dd65cd2b9383ba0 /contrib/tsearch2/query.c | |
parent | c8de36352fe72ae2265eb53a6e1bf334e4f24888 (diff) |
Re-run pgindent, fixing a problem where comment lines after a blank
comment line where output as too long, and update typedefs for /lib
directory. Also fix case where identifiers were used as variable names
in the backend, but as typedefs in ecpg (favor the backend for
indenting).
Backpatch to 8.1.X.
Diffstat (limited to 'contrib/tsearch2/query.c')
-rw-r--r-- | contrib/tsearch2/query.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/contrib/tsearch2/query.c b/contrib/tsearch2/query.c index 013f0031965..0a1805e0e75 100644 --- a/contrib/tsearch2/query.c +++ b/contrib/tsearch2/query.c @@ -169,7 +169,7 @@ gettoken_query(QPRS_STATE * state, int4 *val, int4 *lenval, char **strval, int2 state->state = WAITOPERATOR; return VAL; } - else if ( state->state == WAITFIRSTOPERAND ) + else if (state->state == WAITFIRSTOPERAND) return END; else ereport(ERROR, @@ -620,12 +620,13 @@ static QUERYTYPE * /* parse query & make polish notation (postfix, but in reverse order) */ makepol(&state, pushval); pfree(state.valstate.word); - if (!state.num) { + if (!state.num) + { elog(NOTICE, "Query doesn't contain lexem(s)"); - query = (QUERYTYPE*)palloc( HDRSIZEQT ); + query = (QUERYTYPE *) palloc(HDRSIZEQT); query->len = HDRSIZEQT; query->size = 0; - return query; + return query; } /* make finish struct */ @@ -912,8 +913,8 @@ to_tsquery(PG_FUNCTION_ARGS) PG_FREE_IF_COPY(in, 1); query = queryin(str, pushval_morph, PG_GETARG_INT32(0)); - - if ( query->size == 0 ) + + if (query->size == 0) PG_RETURN_POINTER(query); res = clean_fakeval_v2(GETQUERY(query), &len); |