mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-24 18:55:04 +08:00
Fix broken compare function for tsquery_ops. Per Tom's report.
I never understood why initial authors GiST in pgsql choose so stgrange signature for 'same' method: bool *sameFn(Datum a, Datum b, bool* result) instead of simple, logical bool sameFn(Datum a, Datum b) This change will break any existing GiST extension, so we still live with it and will live.
This commit is contained in:
parent
ce646d7192
commit
fc0a2b45d0
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user