---------------------------------------------------------------- * ExecInitForeignScan * ---------------------------------------------------------------- */
| 140 | * ---------------------------------------------------------------- |
| 141 | */ |
| 142 | ForeignScanState * |
| 143 | ExecInitForeignScan(ForeignScan *node, EState *estate, int eflags) |
| 144 | { |
| 145 | Relation currentRelation = NULL; |
| 146 | |
| 147 | /* |
| 148 | * get the relation object id from the relid'th entry in the range table, |
| 149 | * open that relation and acquire appropriate lock on it. |
| 150 | */ |
| 151 | if (node->scan.scanrelid > 0) |
| 152 | currentRelation = ExecOpenScanRelation(estate, node->scan.scanrelid, eflags); |
| 153 | |
| 154 | return ExecInitForeignScanForPartition(node, estate, eflags, currentRelation); |
| 155 | } |
| 156 | |
| 157 | ForeignScanState * |
| 158 | ExecInitForeignScanForPartition(ForeignScan *node, EState *estate, int eflags, Relation currentRelation) |
no test coverage detected