diff options
Diffstat (limited to 'src/backend/access/gist/gistget.c')
-rw-r--r-- | src/backend/access/gist/gistget.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/backend/access/gist/gistget.c b/src/backend/access/gist/gistget.c index c08a5cc2fea..f7b49430d07 100644 --- a/src/backend/access/gist/gistget.c +++ b/src/backend/access/gist/gistget.c @@ -29,21 +29,23 @@ static bool gistindex_keytest(IndexTuple tuple, TupleDesc tupdesc, Relation r, Page p, OffsetNumber offset); -RetrieveIndexResult -gistgettuple(IndexScanDesc s, ScanDirection dir) +Datum +gistgettuple(PG_FUNCTION_ARGS) { + IndexScanDesc s = (IndexScanDesc) PG_GETARG_POINTER(0); + ScanDirection dir = (ScanDirection) PG_GETARG_INT32(1); RetrieveIndexResult res; /* if we have it cached in the scan desc, just return the value */ if ((res = gistscancache(s, dir)) != (RetrieveIndexResult) NULL) - return res; + PG_RETURN_POINTER(res); /* not cached, so we'll have to do some work */ if (ItemPointerIsValid(&(s->currentItemData))) res = gistnext(s, dir); else res = gistfirst(s, dir); - return res; + PG_RETURN_POINTER(res); } static RetrieveIndexResult |