@@ -178,7 +178,7 @@ gettoken_query(QPRS_STATE * state, int4 *val, int4 *lenval, char **strval, int2
178
178
state -> state = WAITOPERATOR ;
179
179
return VAL ;
180
180
}
181
- else if ( state -> state == WAITFIRSTOPERAND )
181
+ else if (state -> state == WAITFIRSTOPERAND )
182
182
return END ;
183
183
else
184
184
ereport (ERROR ,
@@ -206,13 +206,13 @@ gettoken_query(QPRS_STATE * state, int4 *val, int4 *lenval, char **strval, int2
206
206
return ERR ;
207
207
break ;
208
208
case WAITSINGLEOPERAND :
209
- if ( * (state -> buf ) == '\0' )
209
+ if (* (state -> buf ) == '\0' )
210
210
return END ;
211
211
* strval = state -> buf ;
212
- * lenval = strlen ( state -> buf );
213
- state -> buf += strlen ( state -> buf );
212
+ * lenval = strlen (state -> buf );
213
+ state -> buf += strlen (state -> buf );
214
214
state -> count ++ ;
215
- return VAL ;
215
+ return VAL ;
216
216
default :
217
217
return ERR ;
218
218
break ;
@@ -600,7 +600,7 @@ findoprnd(ITEM * ptr, int4 *pos)
600
600
* input
601
601
*/
602
602
static QUERYTYPE *
603
- queryin (char * buf , void (* pushval ) (QPRS_STATE * , int , char * , int , int2 ), int cfg_id , bool isplain )
603
+ queryin (char * buf , void (* pushval ) (QPRS_STATE * , int , char * , int , int2 ), int cfg_id , bool isplain )
604
604
{
605
605
QPRS_STATE state ;
606
606
int4 i ;
@@ -637,12 +637,13 @@ queryin(char *buf, void (*pushval) (QPRS_STATE *, int, char *, int, int2), int c
637
637
/* parse query & make polish notation (postfix, but in reverse order) */
638
638
makepol (& state , pushval );
639
639
pfree (state .valstate .word );
640
- if (!state .num ) {
640
+ if (!state .num )
641
+ {
641
642
elog (NOTICE , "Query doesn't contain lexem(s)" );
642
- query = (QUERYTYPE * ) palloc ( HDRSIZEQT );
643
+ query = (QUERYTYPE * ) palloc (HDRSIZEQT );
643
644
query -> len = HDRSIZEQT ;
644
645
query -> size = 0 ;
645
- return query ;
646
+ return query ;
646
647
}
647
648
648
649
/* make finish struct */
@@ -928,9 +929,9 @@ to_tsquery(PG_FUNCTION_ARGS)
928
929
str = text2char (in );
929
930
PG_FREE_IF_COPY (in , 1 );
930
931
931
- query = queryin (str , pushval_morph , PG_GETARG_INT32 (0 ),false);
932
-
933
- if ( query -> size == 0 )
932
+ query = queryin (str , pushval_morph , PG_GETARG_INT32 (0 ), false);
933
+
934
+ if (query -> size == 0 )
934
935
PG_RETURN_POINTER (query );
935
936
936
937
res = clean_fakeval_v2 (GETQUERY (query ), & len );
@@ -984,8 +985,8 @@ plainto_tsquery(PG_FUNCTION_ARGS)
984
985
PG_FREE_IF_COPY (in , 1 );
985
986
986
987
query = queryin (str , pushval_morph , PG_GETARG_INT32 (0 ), true);
987
-
988
- if ( query -> size == 0 )
988
+
989
+ if (query -> size == 0 )
989
990
PG_RETURN_POINTER (query );
990
991
991
992
res = clean_fakeval_v2 (GETQUERY (query ), & len );
@@ -1023,4 +1024,3 @@ plainto_tsquery_current(PG_FUNCTION_ARGS)
1023
1024
Int32GetDatum (get_currcfg ()),
1024
1025
PG_GETARG_DATUM (0 )));
1025
1026
}
1026
-
0 commit comments