PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "executor/executor.h"
#include "executor/execPartition.h"
#include "executor/nodeMergeAppend.h"
#include "lib/binaryheap.h"
#include "miscadmin.h"
Go to the source code of this file.
Typedefs | |
typedef int32 | SlotNumber |
Functions | |
static TupleTableSlot * | ExecMergeAppend (PlanState *pstate) |
static int | heap_compare_slots (Datum a, Datum b, void *arg) |
MergeAppendState * | ExecInitMergeAppend (MergeAppend *node, EState *estate, int eflags) |
void | ExecEndMergeAppend (MergeAppendState *node) |
void | ExecReScanMergeAppend (MergeAppendState *node) |
typedef int32 SlotNumber |
Definition at line 52 of file nodeMergeAppend.c.
void ExecEndMergeAppend | ( | MergeAppendState * | node | ) |
Definition at line 320 of file nodeMergeAppend.c.
References ExecEndNode(), i, MergeAppendState::mergeplans, and MergeAppendState::ms_nplans.
Referenced by ExecEndNode().
MergeAppendState* ExecInitMergeAppend | ( | MergeAppend * | node, |
EState * | estate, | ||
int | eflags | ||
) |
Definition at line 65 of file nodeMergeAppend.c.
References SortSupportData::abbreviate, Assert, binaryheap_allocate(), bms_add_range(), bms_next_member(), bms_num_members(), CurrentMemoryContext, PartitionPruneState::do_exec_prune, EXEC_FLAG_BACKWARD, EXEC_FLAG_MARK, ExecInitNode(), ExecInitPartitionPruning(), ExecInitResultTupleSlotTL(), ExecMergeAppend(), PlanState::ExecProcNode, heap_compare_slots(), i, j, list_length(), list_nth(), makeNode, MergeAppendState::mergeplans, MergeAppend::mergeplans, MergeAppendState::ms_heap, MergeAppendState::ms_initialized, MergeAppendState::ms_nkeys, MergeAppendState::ms_nplans, MergeAppendState::ms_prune_state, MergeAppendState::ms_slots, MergeAppendState::ms_sortkeys, MergeAppendState::ms_valid_subplans, MergeAppend::numCols, palloc(), palloc0(), MergeAppend::part_prune_info, PlanState::plan, PrepareSortSupportFromOrderingOp(), MergeAppendState::ps, PlanState::ps_ProjInfo, PlanState::resultopsfixed, PlanState::resultopsset, SortSupportData::ssup_attno, SortSupportData::ssup_collation, SortSupportData::ssup_cxt, SortSupportData::ssup_nulls_first, PlanState::state, and TTSOpsVirtual.
Referenced by ExecInitNode().
|
static |
Definition at line 200 of file nodeMergeAppend.c.
References binaryheap_add_unordered(), binaryheap_build(), binaryheap_empty, binaryheap_first(), binaryheap_remove_first(), binaryheap_replace_first(), bms_next_member(), castNode, CHECK_FOR_INTERRUPTS, DatumGetInt32(), ExecClearTuple(), ExecFindMatchingSubPlans(), ExecProcNode(), i, Int32GetDatum(), MergeAppendState::mergeplans, MergeAppendState::ms_heap, MergeAppendState::ms_initialized, MergeAppendState::ms_nplans, MergeAppendState::ms_prune_state, MergeAppendState::ms_slots, MergeAppendState::ms_valid_subplans, MergeAppendState::ps, PlanState::ps_ResultTupleSlot, and TupIsNull.
Referenced by ExecInitMergeAppend().
void ExecReScanMergeAppend | ( | MergeAppendState * | node | ) |
Definition at line 340 of file nodeMergeAppend.c.
References binaryheap_reset(), bms_free(), bms_overlap(), PlanState::chgParam, PartitionPruneState::execparamids, ExecReScan(), i, MergeAppendState::mergeplans, MergeAppendState::ms_heap, MergeAppendState::ms_initialized, MergeAppendState::ms_nplans, MergeAppendState::ms_prune_state, MergeAppendState::ms_valid_subplans, MergeAppendState::ps, and UpdateChangedParamSet().
Referenced by ExecReScan().
Definition at line 273 of file nodeMergeAppend.c.
References a, ApplySortComparator(), arg, Assert, b, compare(), DatumGetInt32(), INVERT_COMPARE_RESULT, MergeAppendState::ms_nkeys, MergeAppendState::ms_slots, MergeAppendState::ms_sortkeys, s1, s2, slot_getattr(), SortSupportData::ssup_attno, and TupIsNull.
Referenced by ExecInitMergeAppend().