mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-02-05 19:09:58 +08:00
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.
This commit is contained in:
parent
554506871b
commit
04910a3ad5
@ -459,8 +459,12 @@ Datum
|
||||
gistgettuple(PG_FUNCTION_ARGS)
|
||||
{
|
||||
IndexScanDesc scan = (IndexScanDesc) PG_GETARG_POINTER(0);
|
||||
ScanDirection dir = (ScanDirection) PG_GETARG_INT32(1);
|
||||
GISTScanOpaque so = (GISTScanOpaque) scan->opaque;
|
||||
|
||||
if (dir != ForwardScanDirection)
|
||||
elog(ERROR, "GiST only supports forward scan direction");
|
||||
|
||||
if (!so->qual_ok)
|
||||
PG_RETURN_BOOL(false);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user