mirror of
https://github.com/postgres/postgres.git
synced 2025-06-16 06:01:02 +03:00
Third round of fmgr updates: eliminate calls using fmgr() and
fmgr_faddr() in favor of new-style calls. Lots of cleanup of sloppy casts to use XXXGetDatum and DatumGetXXX ...
This commit is contained in:
@ -227,7 +227,7 @@ gistindex_keytest(IndexTuple tuple,
|
||||
{
|
||||
bool isNull;
|
||||
Datum datum;
|
||||
int test;
|
||||
Datum test;
|
||||
GISTENTRY de;
|
||||
|
||||
IncrIndexProcessed();
|
||||
@ -251,19 +251,20 @@ gistindex_keytest(IndexTuple tuple,
|
||||
|
||||
if (key[0].sk_flags & SK_COMMUTE)
|
||||
{
|
||||
test = (*fmgr_faddr(&key[0].sk_func))
|
||||
(DatumGetPointer(key[0].sk_argument),
|
||||
&de, key[0].sk_procedure) ? 1 : 0;
|
||||
test = FunctionCall3(&key[0].sk_func,
|
||||
key[0].sk_argument,
|
||||
PointerGetDatum(&de),
|
||||
ObjectIdGetDatum(key[0].sk_procedure));
|
||||
}
|
||||
else
|
||||
{
|
||||
test = (*fmgr_faddr(&key[0].sk_func))
|
||||
(&de,
|
||||
DatumGetPointer(key[0].sk_argument),
|
||||
key[0].sk_procedure) ? 1 : 0;
|
||||
test = FunctionCall3(&key[0].sk_func,
|
||||
PointerGetDatum(&de),
|
||||
key[0].sk_argument,
|
||||
ObjectIdGetDatum(key[0].sk_procedure));
|
||||
}
|
||||
|
||||
if (!test == !(key[0].sk_flags & SK_NEGATE))
|
||||
if (DatumGetBool(test) == !!(key[0].sk_flags & SK_NEGATE))
|
||||
return false;
|
||||
|
||||
scanKeySize -= 1;
|
||||
|
Reference in New Issue
Block a user