|
PostgreSQL Source Code git master
|
#include "postgres.h"#include "access/htup_details.h"#include "executor/executor.h"#include "executor/nodeSetOp.h"#include "miscadmin.h"#include "utils/memutils.h"
Go to the source code of this file.
Data Structures | |
| struct | SetOpStatePerGroupData |
Typedefs | |
| typedef struct SetOpStatePerGroupData | SetOpStatePerGroupData |
| typedef SetOpStatePerGroupData * | SetOpStatePerGroup |
Functions | |
| static TupleTableSlot * | setop_retrieve_sorted (SetOpState *setopstate) |
| static void | setop_load_group (SetOpStatePerInput *input, PlanState *inputPlan, SetOpState *setopstate) |
| static int | setop_compare_slots (TupleTableSlot *s1, TupleTableSlot *s2, SetOpState *setopstate) |
| static void | setop_fill_hash_table (SetOpState *setopstate) |
| static TupleTableSlot * | setop_retrieve_hash_table (SetOpState *setopstate) |
| static void | build_hash_table (SetOpState *setopstate) |
| Size | EstimateSetOpHashTableSpace (double nentries, Size tupleWidth) |
| static void | set_output_count (SetOpState *setopstate, SetOpStatePerGroup pergroup) |
| static TupleTableSlot * | ExecSetOp (PlanState *pstate) |
| SetOpState * | ExecInitSetOp (SetOp *node, EState *estate, int eflags) |
| void | ExecEndSetOp (SetOpState *node) |
| void | ExecReScanSetOp (SetOpState *node) |
Definition at line 68 of file nodeSetOp.c.
|
static |
Definition at line 84 of file nodeSetOp.c.
References Assert, BuildTupleHashTable(), ExprContext::ecxt_per_tuple_memory, ExecGetCommonChildSlotOps(), ExecGetResultType(), fb(), SetOp::numCols, SetOp::numGroups, outerPlanState, SetOp::plan, SETOP_HASHED, and SetOp::strategy.
Referenced by ExecInitSetOp().
Definition at line 115 of file nodeSetOp.c.
References EstimateTupleHashTableSpace(), and fb().
Referenced by create_setop_path().
| void ExecEndSetOp | ( | SetOpState * | node | ) |
Definition at line 691 of file nodeSetOp.c.
References ExecEndNode(), innerPlanState, MemoryContextDelete(), outerPlanState, and SetOpState::tuplesContext.
Referenced by ExecEndNode().
| SetOpState * ExecInitSetOp | ( | SetOp * | node, |
| EState * | estate, | ||
| int | eflags | ||
| ) |
Definition at line 572 of file nodeSetOp.c.
References ALLOCSET_DEFAULT_SIZES, Assert, build_hash_table(), BumpContextCreate(), CurrentMemoryContext, EXEC_FLAG_BACKWARD, EXEC_FLAG_MARK, ExecAssignExprContext(), ExecInitExtraTupleSlot(), ExecInitNode(), ExecInitResultTupleSlotTL(), ExecSetOp(), execTuplesHashPrepare(), fb(), i, innerPlan, innerPlanState, makeNode, SetOp::numCols, outerPlan, outerPlanState, palloc0(), PrepareSortSupportFromOrderingOp(), SETOP_HASHED, SortSupportData::ssup_cxt, SetOp::strategy, and TTSOpsMinimalTuple.
Referenced by ExecInitNode().
| void ExecReScanSetOp | ( | SetOpState * | node | ) |
Definition at line 703 of file nodeSetOp.c.
References ExecClearTuple(), ExecReScan(), fb(), SetOpState::hashiter, SetOpState::hashtable, innerPlan, innerPlanState, SetOpState::need_init, SetOpState::numOutput, outerPlan, outerPlanState, PlanState::plan, SetOpState::ps, PlanState::ps_ResultTupleSlot, ResetTupleHashIterator, ResetTupleHashTable(), SetOpState::setop_done, SETOP_HASHED, and SetOpState::table_filled.
Referenced by ExecReScan().
|
static |
Definition at line 168 of file nodeSetOp.c.
References castNode, CHECK_FOR_INTERRUPTS, fb(), SetOpState::numOutput, PlanState::plan, SetOpState::ps, PlanState::ps_ResultTupleSlot, SetOpState::setop_done, setop_fill_hash_table(), SETOP_HASHED, setop_retrieve_hash_table(), setop_retrieve_sorted(), and SetOpState::table_filled.
Referenced by ExecInitSetOp().
|
static |
Definition at line 128 of file nodeSetOp.c.
References elog, ERROR, fb(), SetOp::plan, SETOPCMD_EXCEPT, SETOPCMD_EXCEPT_ALL, SETOPCMD_INTERSECT, and SETOPCMD_INTERSECT_ALL.
Referenced by setop_retrieve_hash_table(), and setop_retrieve_sorted().
|
static |
Definition at line 386 of file nodeSetOp.c.
References ApplySortComparator(), compare(), fb(), s1, s2, slot_getallattrs(), and SortSupportData::ssup_attno.
Referenced by setop_load_group(), and setop_retrieve_sorted().
|
static |
Definition at line 415 of file nodeSetOp.c.
References ExecProcNode(), fb(), innerPlan, innerPlanState, LookupTupleHashEntry(), outerPlan, outerPlanState, ResetExprContext, ResetTupleHashIterator, TupIsNull, and TupleHashEntryGetAdditional().
Referenced by ExecSetOp().
|
static |
Definition at line 339 of file nodeSetOp.c.
References Assert, ExecClearTuple(), ExecCopySlotMinimalTuple(), ExecProcNode(), ExecStoreMinimalTuple(), fb(), input, setop_compare_slots(), and TupIsNull.
Referenced by setop_retrieve_sorted().
|
static |
Definition at line 512 of file nodeSetOp.c.
References CHECK_FOR_INTERRUPTS, ExecClearTuple(), ExecStoreMinimalTuple(), fb(), ScanTupleHashTable, set_output_count(), TupleHashEntryGetAdditional(), and TupleHashEntryGetTuple().
Referenced by ExecSetOp().
|
static |
Definition at line 205 of file nodeSetOp.c.
References ExecClearTuple(), ExecProcNode(), fb(), innerPlan, innerPlanState, outerPlan, outerPlanState, set_output_count(), setop_compare_slots(), setop_load_group(), and TupIsNull.
Referenced by ExecSetOp().