Skip to content

Commit 04910a3

Browse files
committed
Put back gistgettuple's check for backwards scan request.
On reflection it's a bad idea for the KNNGIST patch to have removed that. We don't want it silently returning incorrect answers.
1 parent 5545068 commit 04910a3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/backend/access/gist/gistget.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,8 +459,12 @@ Datum
459459
gistgettuple(PG_FUNCTION_ARGS)
460460
{
461461
IndexScanDesc scan = (IndexScanDesc) PG_GETARG_POINTER(0);
462+
ScanDirection dir = (ScanDirection) PG_GETARG_INT32(1);
462463
GISTScanOpaque so = (GISTScanOpaque) scan->opaque;
463464

465+
if (dir != ForwardScanDirection)
466+
elog(ERROR, "GiST only supports forward scan direction");
467+
464468
if (!so->qual_ok)
465469
PG_RETURN_BOOL(false);
466470

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy