static int smlar_smltype = ST_COSINE;
static const struct config_enum_entry SmlarTypeOptions[] = {
- {"cosine", ST_COSINE, false},
+ {"cosine", ST_COSINE, false},
{"tfidf", ST_TFIDF, false},
{"overlap", ST_OVERLAP, false},
{NULL, 0, false}
static int smlar_tf_method = TF_N;
static const struct config_enum_entry SmlarTFOptions[] = {
- {"n", TF_N, false},
+ {"n", TF_N, false},
{"log", TF_LOG, false},
{"const", TF_CONST, false},
{NULL, 0, false}
}
PG_FUNCTION_INFO_V1(set_smlar_limit);
-Datum set_smlar_limit(PG_FUNCTION_ARGS);
+Datum set_smlar_limit(PG_FUNCTION_ARGS);
Datum
set_smlar_limit(PG_FUNCTION_ARGS)
{
- float4 nlimit = PG_GETARG_FLOAT4(0);
- char buf[32];
+ float4 nlimit = PG_GETARG_FLOAT4(0);
+ char buf[32];
/* init smlar guc */
initSmlarGUC();
- sprintf(buf,"%f", nlimit);
- set_config_option("smlar.threshold", buf,
- PGC_USERSET, PGC_S_SESSION ,GUC_ACTION_SET, true, 0);
+ sprintf(buf,"%f", nlimit);
+ set_config_option("smlar.threshold", buf,
+ PGC_USERSET, PGC_S_SESSION ,GUC_ACTION_SET, true, 0
+#if PG_VERSION_NUM >= 90500
+ ,false
+#endif
+ );
PG_RETURN_FLOAT4((float4)GetSmlarLimit());
}
PG_FUNCTION_INFO_V1(show_smlar_limit);
-Datum show_smlar_limit(PG_FUNCTION_ARGS);
+Datum show_smlar_limit(PG_FUNCTION_ARGS);
Datum
show_smlar_limit(PG_FUNCTION_ARGS)
{