diff options
Diffstat (limited to 'contrib/pg_trgm/trgm_gist.c')
-rw-r--r-- | contrib/pg_trgm/trgm_gist.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/pg_trgm/trgm_gist.c b/contrib/pg_trgm/trgm_gist.c index 07d1dc308bb..cbd89586cda 100644 --- a/contrib/pg_trgm/trgm_gist.c +++ b/contrib/pg_trgm/trgm_gist.c @@ -294,7 +294,8 @@ gtrgm_consistent(PG_FUNCTION_ARGS) float4 tmpsml = cnt_sml(key, qtrg); /* strange bug at freebsd 5.2.1 and gcc 3.3.3 */ - res = (*(int *) &tmpsml == *(int *) &trgm_limit || tmpsml > trgm_limit) ? true : false; + res = (*(int *) &tmpsml == *(int *) &similarity_threshold + || tmpsml > similarity_threshold) ? true : false; } else if (ISALLTRUE(key)) { /* non-leaf contains signature */ @@ -308,7 +309,8 @@ gtrgm_consistent(PG_FUNCTION_ARGS) if (len == 0) res = false; else - res = (((((float8) count) / ((float8) len))) >= trgm_limit) ? true : false; + res = (((((float8) count) / ((float8) len))) >= similarity_threshold) + ? true : false; } break; case ILikeStrategyNumber: |