* Return next tuple from `scan`, store in slot. */
| 1233 | * Return next tuple from `scan`, store in slot. |
| 1234 | */ |
| 1235 | static inline bool |
| 1236 | table_scan_getnextslot(TableScanDesc sscan, ScanDirection direction, TupleTableSlot *slot) |
| 1237 | { |
| 1238 | slot->tts_tableOid = RelationGetRelid(sscan->rs_rd); |
| 1239 | |
| 1240 | /* |
| 1241 | * We don't expect direct calls to table_scan_getnextslot with valid |
| 1242 | * CheckXidAlive for catalog or regular tables. See detailed comments in |
| 1243 | * xact.c where these variables are declared. |
| 1244 | */ |
| 1245 | if (unlikely(TransactionIdIsValid(CheckXidAlive) && !bsysscan)) |
| 1246 | elog(ERROR, "unexpected table_scan_getnextslot call during logical decoding"); |
| 1247 | |
| 1248 | return sscan->rs_rd->rd_tableam->scan_getnextslot(sscan, direction, slot); |
| 1249 | } |
| 1250 | |
| 1251 | /* ---------------------------------------------------------------------------- |
| 1252 | * TID Range scanning related functions. |
no outgoing calls
no test coverage detected