---------------------------------------------------------------- * ExecInitIndexScan * * Initializes the index scan's state information, creates * scan keys, and opens the base and index relations. * * Note: index scans have 2 sets of state information because * we have to keep track of the base relation and the * index relation. * ---------------------------------------------
| 908 | * ---------------------------------------------------------------- |
| 909 | */ |
| 910 | IndexScanState * |
| 911 | ExecInitIndexScan(IndexScan *node, EState *estate, int eflags) |
| 912 | { |
| 913 | Relation currentRelation; |
| 914 | |
| 915 | /* |
| 916 | * open the base relation and acquire appropriate lock on it. |
| 917 | */ |
| 918 | currentRelation = ExecOpenScanRelation(estate, node->scan.scanrelid, eflags); |
| 919 | |
| 920 | return ExecInitIndexScanForPartition(node, estate, eflags, |
| 921 | currentRelation, node->indexid); |
| 922 | } |
| 923 | |
| 924 | IndexScanState * |
| 925 | ExecInitIndexScanForPartition(IndexScan *node, EState *estate, int eflags, |
no test coverage detected