diff options
Diffstat (limited to 'src/backend/executor/nodeForeignscan.c')
-rw-r--r-- | src/backend/executor/nodeForeignscan.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/backend/executor/nodeForeignscan.c b/src/backend/executor/nodeForeignscan.c index 40b6fbe891a..52af1dac5c4 100644 --- a/src/backend/executor/nodeForeignscan.c +++ b/src/backend/executor/nodeForeignscan.c @@ -55,17 +55,11 @@ ForeignNext(ForeignScanState *node) MemoryContextSwitchTo(oldcontext); /* - * If any system columns are requested, we have to force the tuple into - * physical-tuple form to avoid "cannot extract system attribute from - * virtual tuple" errors later. We also insert a valid value for - * tableoid, which is the only actually-useful system column. + * Insert valid value into tableoid, the only actually-useful system + * column. */ if (plan->fsSystemCol && !TupIsNull(slot)) - { - HeapTuple tup = ExecFetchSlotHeapTuple(slot, true, NULL); - - tup->t_tableOid = RelationGetRelid(node->ss.ss_currentRelation); - } + slot->tts_tableOid = RelationGetRelid(node->ss.ss_currentRelation); return slot; } |