Return a bitmap representing columns being updated */
| 1350 | |
| 1351 | /* Return a bitmap representing columns being updated */ |
| 1352 | Bitmapset * |
| 1353 | ExecGetUpdatedCols(ResultRelInfo *relinfo, EState *estate) |
| 1354 | { |
| 1355 | /* see ExecGetInsertedCols() */ |
| 1356 | if (relinfo->ri_RangeTableIndex != 0) |
| 1357 | { |
| 1358 | RangeTblEntry *rte = exec_rt_fetch(relinfo->ri_RangeTableIndex, estate); |
| 1359 | |
| 1360 | return rte->updatedCols; |
| 1361 | } |
| 1362 | else if (relinfo->ri_RootResultRelInfo) |
| 1363 | { |
| 1364 | ResultRelInfo *rootRelInfo = relinfo->ri_RootResultRelInfo; |
| 1365 | RangeTblEntry *rte = exec_rt_fetch(rootRelInfo->ri_RangeTableIndex, estate); |
| 1366 | |
| 1367 | if (relinfo->ri_RootToPartitionMap != NULL) |
| 1368 | return execute_attr_map_cols(relinfo->ri_RootToPartitionMap->attrMap, |
| 1369 | rte->updatedCols); |
| 1370 | else |
| 1371 | return rte->updatedCols; |
| 1372 | } |
| 1373 | else |
| 1374 | return NULL; |
| 1375 | } |
| 1376 | |
| 1377 | /* Return a bitmap representing generated columns being updated */ |
| 1378 | Bitmapset * |
no test coverage detected