* Return a relInfo's tuple slot for processing returning tuples. */
| 1265 | * Return a relInfo's tuple slot for processing returning tuples. |
| 1266 | */ |
| 1267 | TupleTableSlot * |
| 1268 | ExecGetReturningSlot(EState *estate, ResultRelInfo *relInfo) |
| 1269 | { |
| 1270 | if (relInfo->ri_ReturningSlot == NULL) |
| 1271 | { |
| 1272 | Relation rel = relInfo->ri_RelationDesc; |
| 1273 | MemoryContext oldcontext = MemoryContextSwitchTo(estate->es_query_cxt); |
| 1274 | |
| 1275 | relInfo->ri_ReturningSlot = |
| 1276 | ExecInitExtraTupleSlot(estate, |
| 1277 | RelationGetDescr(rel), |
| 1278 | table_slot_callbacks(rel)); |
| 1279 | |
| 1280 | MemoryContextSwitchTo(oldcontext); |
| 1281 | } |
| 1282 | |
| 1283 | return relInfo->ri_ReturningSlot; |
| 1284 | } |
| 1285 | |
| 1286 | /* |
| 1287 | * Return the map needed to convert given child result relation's tuples to |
no test coverage detected