File tree 1 file changed +13
-0
lines changed
1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -165,6 +165,19 @@ IndexOnlyNext(IndexOnlyScanState *node)
165
165
}
166
166
}
167
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
+
168
181
/*
169
182
* Predicate locks for index-only scans must be acquired at the page
170
183
* level when the heap is not accessed, since tuple-level predicate
You can’t perform that action at this time.
0 commit comments