PostgreSQL Source Code
git master
|
Go to the source code of this file.
void ExecEndIndexScan | ( | IndexScanState * | node | ) |
Definition at line 785 of file nodeIndexscan.c.
References index_close(), index_endscan(), IndexScanState::iss_RelationDesc, IndexScanState::iss_ScanDesc, and NoLock.
Referenced by ExecEndNode().
bool ExecIndexAdvanceArrayKeys | ( | IndexArrayKeyInfo * | arrayKeys, |
int | numArrayKeys | ||
) |
Definition at line 740 of file nodeIndexscan.c.
References IndexArrayKeyInfo::elem_nulls, IndexArrayKeyInfo::elem_values, j, IndexArrayKeyInfo::next_elem, IndexArrayKeyInfo::num_elems, IndexArrayKeyInfo::scan_key, ScanKeyData::sk_argument, ScanKeyData::sk_flags, and SK_ISNULL.
Referenced by MultiExecBitmapIndexScan().
void ExecIndexBuildScanKeys | ( | PlanState * | planstate, |
Relation | index, | ||
List * | quals, | ||
bool | isorderby, | ||
ScanKey * | scanKeys, | ||
int * | numScanKeys, | ||
IndexRuntimeKeyInfo ** | runtimeKeys, | ||
int * | numRuntimeKeys, | ||
IndexArrayKeyInfo ** | arrayKeys, | ||
int * | numArrayKeys | ||
) |
Definition at line 1135 of file nodeIndexscan.c.
References arg, NullTest::arg, ScalarArrayOpExpr::args, IndexArrayKeyInfo::array_expr, Assert, BTORDER_PROC, elog, ERROR, ExecInitExpr(), forfour, get_leftop(), get_op_opfamily_properties(), get_opfamily_proc(), get_rightop(), INDEX_VAR, IndexRelationGetNumberOfKeyAttributes, InvalidOid, InvalidStrategy, IS_NOT_NULL, IS_NULL, IsA, j, IndexRuntimeKeyInfo::key_expr, IndexRuntimeKeyInfo::key_toastable, RowCompareExpr::largs, lfirst, lfirst_oid, linitial, list_length(), lsecond, MemSet, nodeTag, NullTest::nulltesttype, ScalarArrayOpExpr::opno, palloc(), palloc0(), pfree(), PointerGetDatum(), RowCompareExpr::rargs, RowCompareExpr::rctype, RegProcedureIsValid, repalloc(), IndexRuntimeKeyInfo::scan_key, IndexArrayKeyInfo::scan_key, ScanKeyEntryInitialize(), ScanKeyData::sk_argument, ScanKeyData::sk_attno, ScanKeyData::sk_flags, SK_ISNULL, SK_ORDER_BY, SK_ROW_END, SK_ROW_HEADER, SK_ROW_MEMBER, SK_SEARCHARRAY, SK_SEARCHNOTNULL, SK_SEARCHNULL, ScanKeyData::sk_strategy, TypeIsToastable, and ScalarArrayOpExpr::useOr.
Referenced by ExecInitBitmapIndexScan(), ExecInitIndexOnlyScan(), and ExecInitIndexScan().
bool ExecIndexEvalArrayKeys | ( | ExprContext * | econtext, |
IndexArrayKeyInfo * | arrayKeys, | ||
int | numArrayKeys | ||
) |
Definition at line 661 of file nodeIndexscan.c.
References ARR_ELEMTYPE, IndexArrayKeyInfo::array_expr, DatumGetArrayTypeP, deconstruct_array(), ExprContext::ecxt_per_tuple_memory, IndexArrayKeyInfo::elem_nulls, IndexArrayKeyInfo::elem_values, ExecEvalExpr(), get_typlenbyvalalign(), j, MemoryContextSwitchTo(), IndexArrayKeyInfo::next_elem, IndexArrayKeyInfo::num_elems, IndexArrayKeyInfo::scan_key, ScanKeyData::sk_argument, ScanKeyData::sk_flags, and SK_ISNULL.
Referenced by ExecReScanBitmapIndexScan().
void ExecIndexEvalRuntimeKeys | ( | ExprContext * | econtext, |
IndexRuntimeKeyInfo * | runtimeKeys, | ||
int | numRuntimeKeys | ||
) |
Definition at line 599 of file nodeIndexscan.c.
References ExprContext::ecxt_per_tuple_memory, ExecEvalExpr(), j, IndexRuntimeKeyInfo::key_expr, MemoryContextSwitchTo(), PG_DETOAST_DATUM, PointerGetDatum(), IndexRuntimeKeyInfo::scan_key, ScanKeyData::sk_argument, ScanKeyData::sk_flags, and SK_ISNULL.
Referenced by ExecReScanBitmapIndexScan(), ExecReScanIndexOnlyScan(), and ExecReScanIndexScan().
void ExecIndexMarkPos | ( | IndexScanState * | node | ) |
Definition at line 813 of file nodeIndexscan.c.
References Assert, elog, ERROR, EState::es_epq_active, index_markpos(), IndexScanState::iss_ScanDesc, PlanState::plan, ScanState::ps, EPQState::relsubs_done, EPQState::relsubs_rowmark, EPQState::relsubs_slot, IndexScanState::ss, and PlanState::state.
Referenced by ExecMarkPos().
void ExecIndexRestrPos | ( | IndexScanState * | node | ) |
Definition at line 850 of file nodeIndexscan.c.
References Assert, elog, ERROR, EState::es_epq_active, index_restrpos(), IndexScanState::iss_ScanDesc, PlanState::plan, ScanState::ps, EPQState::relsubs_done, EPQState::relsubs_rowmark, EPQState::relsubs_slot, IndexScanState::ss, and PlanState::state.
Referenced by ExecRestrPos().
void ExecIndexScanEstimate | ( | IndexScanState * | node, |
ParallelContext * | pcxt | ||
) |
Definition at line 1641 of file nodeIndexscan.c.
References EState::es_snapshot, ParallelContext::estimator, index_parallelscan_estimate(), IndexScanState::iss_NumOrderByKeys, IndexScanState::iss_NumScanKeys, IndexScanState::iss_PscanLen, IndexScanState::iss_RelationDesc, ScanState::ps, shm_toc_estimate_chunk, shm_toc_estimate_keys, IndexScanState::ss, and PlanState::state.
Referenced by ExecParallelEstimate().
void ExecIndexScanInitializeDSM | ( | IndexScanState * | node, |
ParallelContext * | pcxt | ||
) |
Definition at line 1661 of file nodeIndexscan.c.
References EState::es_snapshot, index_beginscan_parallel(), index_parallelscan_initialize(), index_rescan(), IndexScanState::iss_NumOrderByKeys, IndexScanState::iss_NumRuntimeKeys, IndexScanState::iss_NumScanKeys, IndexScanState::iss_OrderByKeys, IndexScanState::iss_PscanLen, IndexScanState::iss_RelationDesc, IndexScanState::iss_RuntimeKeysReady, IndexScanState::iss_ScanDesc, IndexScanState::iss_ScanKeys, PlanState::plan, Plan::plan_node_id, ScanState::ps, shm_toc_allocate(), shm_toc_insert(), IndexScanState::ss, ScanState::ss_currentRelation, PlanState::state, and ParallelContext::toc.
Referenced by ExecParallelInitializeDSM().
void ExecIndexScanInitializeWorker | ( | IndexScanState * | node, |
ParallelWorkerContext * | pwcxt | ||
) |
Definition at line 1710 of file nodeIndexscan.c.
References index_beginscan_parallel(), index_rescan(), IndexScanState::iss_NumOrderByKeys, IndexScanState::iss_NumRuntimeKeys, IndexScanState::iss_NumScanKeys, IndexScanState::iss_OrderByKeys, IndexScanState::iss_RelationDesc, IndexScanState::iss_RuntimeKeysReady, IndexScanState::iss_ScanDesc, IndexScanState::iss_ScanKeys, PlanState::plan, Plan::plan_node_id, ScanState::ps, shm_toc_lookup(), IndexScanState::ss, ScanState::ss_currentRelation, and ParallelWorkerContext::toc.
Referenced by ExecParallelInitializeWorker().
void ExecIndexScanReInitializeDSM | ( | IndexScanState * | node, |
ParallelContext * | pcxt | ||
) |
Definition at line 1697 of file nodeIndexscan.c.
References index_parallelrescan(), and IndexScanState::iss_ScanDesc.
Referenced by ExecParallelReInitializeDSM().
IndexScanState* ExecInitIndexScan | ( | IndexScan * | node, |
EState * | estate, | ||
int | eflags | ||
) |
Definition at line 886 of file nodeIndexscan.c.
References SortSupportData::abbreviate, Assert, CurrentMemoryContext, EXEC_FLAG_EXPLAIN_ONLY, exec_rt_fetch(), ExecAssignExprContext(), ExecAssignScanProjectionInfo(), ExecIndexBuildScanKeys(), ExecIndexScan(), ExecInitExprList(), ExecInitQual(), ExecInitResultTypeTL(), ExecInitScanTupleSlot(), ExecOpenScanRelation(), PlanState::ExecProcNode, exprCollation(), exprType(), forboth, get_typlenbyval(), i, index_open(), IndexScan::indexid, IndexScan::indexorderby, IndexScan::indexorderbyops, IndexScanState::indexorderbyorig, IndexScan::indexorderbyorig, IndexScan::indexqual, IndexScanState::indexqualorig, IndexScan::indexqualorig, IndexScanState::iss_NumOrderByKeys, IndexScanState::iss_NumRuntimeKeys, IndexScanState::iss_NumScanKeys, IndexScanState::iss_OrderByKeys, IndexScanState::iss_OrderByNulls, IndexScanState::iss_OrderByTypByVals, IndexScanState::iss_OrderByTypLens, IndexScanState::iss_OrderByValues, IndexScanState::iss_RelationDesc, IndexScanState::iss_ReorderQueue, IndexScanState::iss_RuntimeContext, IndexScanState::iss_RuntimeKeys, IndexScanState::iss_RuntimeKeysReady, IndexScanState::iss_ScanKeys, IndexScanState::iss_SortSupport, lfirst, lfirst_oid, list_length(), makeNode, pairingheap_allocate(), palloc(), palloc0(), PlanState::plan, PrepareSortSupportFromOrderingOp(), ScanState::ps, PlanState::ps_ExprContext, PlanState::qual, RelationGetDescr, reorderqueue_cmp(), IndexScan::scan, Scan::scanrelid, IndexScanState::ss, ScanState::ss_currentRelation, ScanState::ss_currentScanDesc, SortSupportData::ssup_attno, SortSupportData::ssup_collation, SortSupportData::ssup_cxt, SortSupportData::ssup_nulls_first, PlanState::state, and table_slot_callbacks().
Referenced by ExecInitNode().
void ExecReScanIndexScan | ( | IndexScanState * | node | ) |
Definition at line 551 of file nodeIndexscan.c.
References ExecIndexEvalRuntimeKeys(), ExecScanReScan(), heap_freetuple(), index_rescan(), IndexScanState::iss_NumOrderByKeys, IndexScanState::iss_NumRuntimeKeys, IndexScanState::iss_NumScanKeys, IndexScanState::iss_OrderByKeys, IndexScanState::iss_ReachedEnd, IndexScanState::iss_ReorderQueue, IndexScanState::iss_RuntimeContext, IndexScanState::iss_RuntimeKeys, IndexScanState::iss_RuntimeKeysReady, IndexScanState::iss_ScanDesc, IndexScanState::iss_ScanKeys, pairingheap_is_empty, reorderqueue_pop(), ResetExprContext, and IndexScanState::ss.
Referenced by ExecReScan().