mirror of
https://github.com/postgres/postgres.git
synced 2025-06-11 20:28:21 +03:00
GUC variable pg_trgm.similarity_threshold insead of set_limit()
Use GUC variable pg_trgm.similarity_threshold insead of set_limit()/show_limit() which was introduced when defining GUC varuables by modules was absent. Author: Artur Zakirov
This commit is contained in:
@ -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:
|
||||
|
Reference in New Issue
Block a user