diff --git a/contrib/tsearch2/query_gist.c b/contrib/tsearch2/query_gist.c index aafb6901092..b49178aa835 100644 --- a/contrib/tsearch2/query_gist.c +++ b/contrib/tsearch2/query_gist.c @@ -231,8 +231,11 @@ gtsq_same(PG_FUNCTION_ARGS) { TPQTGist *a = (TPQTGist *) PG_GETARG_POINTER(0); TPQTGist *b = (TPQTGist *) PG_GETARG_POINTER(1); + bool *result = (bool *) PG_GETARG_POINTER(2); - PG_RETURN_POINTER(*a == *b); + *result = (*a == *b) ? true : false; + + PG_RETURN_POINTER(result); } static int