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

Commit081a604

Browse files
committed
Fix another oversight in CustomScan patch.
execCurrent.c's search_plan_tree() must recognize a CustomScan on thetarget relation. This would only be helpful for custom providers thatsupport CurrentOfExpr quals, which is probably a bit far-fetched, butit's not impossible I think. But even without assuming that, we needto recognize a scanned-relation match so that we will properly throwerror if the desired relation is being scanned with both a CustomScanand a regular scan (ie, self-join).Also recognize ForeignScanState for similar reasons. Supporting WHERECURRENT OF on a foreign table is probably even more far-fetched thanit is for custom scans, but I think in principle you could do it withpostgres_fdw (or another FDW that supports the ctid column). Thiswould be a back-patchable bug fix if existing FDWs handled CurrentOfExpr,but I doubt any do so I won't bother back-patching.
1 parent03e574a commit081a604

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎src/backend/executor/execCurrent.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,13 +258,15 @@ search_plan_tree(PlanState *node, Oid table_oid)
258258
switch (nodeTag(node))
259259
{
260260
/*
261-
* scan nodes can all be treated alike
261+
*Relationscan nodes can all be treated alike
262262
*/
263263
caseT_SeqScanState:
264264
caseT_IndexScanState:
265265
caseT_IndexOnlyScanState:
266266
caseT_BitmapHeapScanState:
267267
caseT_TidScanState:
268+
caseT_ForeignScanState:
269+
caseT_CustomScanState:
268270
{
269271
ScanState*sstate= (ScanState*)node;
270272

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp