Content-Length: 265304 | pFad | http://github.com/postgrespro/postgres_cluster/commit/04910a3ad5cd2901558da2a4fad9a2e2819348aa

A0 Put back gistgettuple's check for backwards scan request. · postgrespro/postgres_cluster@04910a3 · GitHub
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/04910a3ad5cd2901558da2a4fad9a2e2819348aa

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy