---------------------------------------------------------------- * ExecMaterialMarkPos * * Calls tuplestore to save the current position in the stored file. * ---------------------------------------------------------------- */
| 382 | * ---------------------------------------------------------------- |
| 383 | */ |
| 384 | void |
| 385 | ExecMaterialMarkPos(MaterialState *node) |
| 386 | { |
| 387 | Assert(node->eflags & EXEC_FLAG_MARK); |
| 388 | |
| 389 | /* |
| 390 | * if we haven't materialized yet, just return. |
| 391 | */ |
| 392 | if (!node->tuplestorestate) |
| 393 | return; |
| 394 | |
| 395 | /* |
| 396 | * copy the active read pointer to the mark. |
| 397 | */ |
| 398 | tuplestore_copy_read_pointer(node->tuplestorestate, 0, 1); |
| 399 | |
| 400 | /* |
| 401 | * since we may have advanced the mark, try to truncate the tuplestore. |
| 402 | */ |
| 403 | tuplestore_trim(node->tuplestorestate); |
| 404 | } |
| 405 | |
| 406 | /* ---------------------------------------------------------------- |
| 407 | * ExecMaterialRestrPos |
no test coverage detected