Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf84c860

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 justthrow an error if the opclass tries it.
1 parent7280948 commitf84c860

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 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+
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)

[8]ページ先頭

©2009-2025 Movatter.jp