diff options
Diffstat (limited to 'src/backend/optimizer/prep/preptlist.c')
-rw-r--r-- | src/backend/optimizer/prep/preptlist.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/optimizer/prep/preptlist.c b/src/backend/optimizer/prep/preptlist.c index 8a6c3cc5e5c..08e7c446d88 100644 --- a/src/backend/optimizer/prep/preptlist.c +++ b/src/backend/optimizer/prep/preptlist.c @@ -92,9 +92,9 @@ preprocess_targetlist(PlannerInfo *root, List *tlist) if (rc->rti != rc->prti) continue; - if (rc->markType != ROW_MARK_COPY) + if (rc->allMarkTypes & ~(1 << ROW_MARK_COPY)) { - /* It's a regular table, so fetch its TID */ + /* Need to fetch TID */ var = makeVar(rc->rti, SelfItemPointerAttributeNumber, TIDOID, @@ -125,9 +125,9 @@ preprocess_targetlist(PlannerInfo *root, List *tlist) tlist = lappend(tlist, tle); } } - else + if (rc->allMarkTypes & (1 << ROW_MARK_COPY)) { - /* Not a table, so we need the whole row as a junk var */ + /* Need the whole row as a junk var */ var = makeWholeRowVar(rt_fetch(rc->rti, range_table), rc->rti, 0, |