We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent7280948 commitf84c860Copy full SHA for f84c860
src/backend/executor/nodeIndexonlyscan.c
@@ -165,6 +165,19 @@ IndexOnlyNext(IndexOnlyScanState *node)
165
}
166
167
168
+/*
169
+ * We don't currently support rechecking ORDER BY distances. (In
170
+ * principle, if the index can support retrieval of the originally
171
+ * indexed value, it should be able to produce an exact distance
172
+ * calculation too. So it's not clear that adding code here for
173
+ * recheck/re-sort would be worth the trouble. But we should at least
174
+ * throw an error if someone tries it.)
175
+ */
176
+if (scandesc->numberOfOrderBys>0&&scandesc->xs_recheckorderby)
177
+ereport(ERROR,
178
+(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
179
+errmsg("lossy distance functions are not supported in index-only scans")));
180
+
181
/*
182
* Predicate locks for index-only scans must be acquired at the page
183
* level when the heap is not accessed, since tuple-level predicate