Commit 04910a3a authored by Tom Lane's avatar Tom Lane

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.
parent 55450687
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment