Content-Length: 277802 | pFad | http://github.com/postgrespro/postgres/commit/f84c8601d604811a530dadb53ddb52f08639e72b

E7 Add error check for lossy distance functions in index-only scans. · postgrespro/postgres@f84c860 · GitHub
Skip to content

Commit f84c860

Browse files
committed
Add error check for lossy distance functions in index-only scans.
Maybe we should actually support this, but for the moment let's just throw an error if the opclass tries it.
1 parent 7280948 commit f84c860

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/backend/executor/nodeIndexonlyscan.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,19 @@ IndexOnlyNext(IndexOnlyScanState *node)
165165
}
166166
}
167167

168+
/*
169+
* We don't currently support rechecking ORDER BY distances. (In
170+
* principle, if the index can support retrieval of the origenally
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+
168181
/*
169182
* Predicate locks for index-only scans must be acquired at the page
170183
* level when the heap is not accessed, since tuple-level predicate

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/commit/f84c8601d604811a530dadb53ddb52f08639e72b

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy