@@ -166,7 +166,7 @@ gbt_var_node_cp_len(const GBT_VARKEY *node, const gbtree_vinfo *tinfo)
166166 * returns true, if query matches prefix ( common prefix )
167167 */
168168static bool
169- gbt_bytea_pf_match (const bytea * pf , const bytea * query , const gbtree_vinfo * tinfo )
169+ gbt_bytea_pf_match (const bytea * pf , const bytea * query )
170170{
171171 bool out = false;
172172 int32 qlen = VARSIZE (query ) - VARHDRSZ ;
@@ -191,8 +191,8 @@ static bool
191191gbt_var_node_pf_match (const GBT_VARKEY_R * node , const bytea * query , const gbtree_vinfo * tinfo )
192192{
193193 return (tinfo -> trnc &&
194- (gbt_bytea_pf_match (node -> lower , query , tinfo ) ||
195- gbt_bytea_pf_match (node -> upper , query , tinfo )));
194+ (gbt_bytea_pf_match (node -> lower , query ) ||
195+ gbt_bytea_pf_match (node -> upper , query )));
196196}
197197
198198
@@ -201,7 +201,7 @@ gbt_var_node_pf_match(const GBT_VARKEY_R *node, const bytea *query, const gbtree
201201* cpf_length .. common prefix length
202202*/
203203static GBT_VARKEY *
204- gbt_var_node_truncate (const GBT_VARKEY * node , int32 cpf_length , const gbtree_vinfo * tinfo )
204+ gbt_var_node_truncate (const GBT_VARKEY * node , int32 cpf_length )
205205{
206206 GBT_VARKEY * out = NULL ;
207207 GBT_VARKEY_R r = gbt_var_key_readable (node );
@@ -348,7 +348,7 @@ gbt_var_union(const GistEntryVector *entryvec, int32 *size, Oid collation,
348348 GBT_VARKEY * trc = NULL ;
349349
350350 plen = gbt_var_node_cp_len ((GBT_VARKEY * ) DatumGetPointer (out ), tinfo );
351- trc = gbt_var_node_truncate ((GBT_VARKEY * ) DatumGetPointer (out ), plen + 1 , tinfo );
351+ trc = gbt_var_node_truncate ((GBT_VARKEY * ) DatumGetPointer (out ), plen + 1 );
352352
353353 out = PointerGetDatum (trc );
354354 }
@@ -399,9 +399,9 @@ gbt_var_penalty(float *res, const GISTENTRY *o, const GISTENTRY *n,
399399 if ((VARSIZE (ok .lower ) - VARHDRSZ ) == 0 && (VARSIZE (ok .upper ) - VARHDRSZ ) == 0 )
400400 * res = 0.0 ;
401401 else if (!((tinfo -> f_cmp (nk .lower , ok .lower , collation , flinfo ) >= 0 ||
402- gbt_bytea_pf_match (ok .lower , nk .lower , tinfo )) &&
402+ gbt_bytea_pf_match (ok .lower , nk .lower )) &&
403403 (tinfo -> f_cmp (nk .upper , ok .upper , collation , flinfo ) <= 0 ||
404- gbt_bytea_pf_match (ok .upper , nk .upper , tinfo ))))
404+ gbt_bytea_pf_match (ok .upper , nk .upper ))))
405405 {
406406 Datum d = PointerGetDatum (0 );
407407 double dres ;
@@ -537,8 +537,8 @@ gbt_var_picksplit(const GistEntryVector *entryvec, GIST_SPLITVEC *v,
537537 ll = Max (ll , lr );
538538 ll ++ ;
539539
540- dl = gbt_var_node_truncate ((GBT_VARKEY * ) DatumGetPointer (v -> spl_ldatum ), ll , tinfo );
541- dr = gbt_var_node_truncate ((GBT_VARKEY * ) DatumGetPointer (v -> spl_rdatum ), ll , tinfo );
540+ dl = gbt_var_node_truncate ((GBT_VARKEY * ) DatumGetPointer (v -> spl_ldatum ), ll );
541+ dr = gbt_var_node_truncate ((GBT_VARKEY * ) DatumGetPointer (v -> spl_rdatum ), ll );
542542 v -> spl_ldatum = PointerGetDatum (dl );
543543 v -> spl_rdatum = PointerGetDatum (dr );
544544 }
0 commit comments