PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "executor/executor.h"
#include "executor/nodeTableFuncscan.h"
#include "executor/tablefunc.h"
#include "miscadmin.h"
#include "nodes/execnodes.h"
#include "utils/builtins.h"
#include "utils/jsonpath.h"
#include "utils/lsyscache.h"
#include "utils/memutils.h"
#include "utils/xml.h"
Go to the source code of this file.
Functions | |
static TupleTableSlot * | TableFuncNext (TableFuncScanState *node) |
static bool | TableFuncRecheck (TableFuncScanState *node, TupleTableSlot *slot) |
static void | tfuncFetchRows (TableFuncScanState *tstate, ExprContext *econtext) |
static void | tfuncInitialize (TableFuncScanState *tstate, ExprContext *econtext, Datum doc) |
static void | tfuncLoadRows (TableFuncScanState *tstate, ExprContext *econtext) |
static TupleTableSlot * | ExecTableFuncScan (PlanState *pstate) |
TableFuncScanState * | ExecInitTableFuncScan (TableFuncScan *node, EState *estate, int eflags) |
void | ExecEndTableFuncScan (TableFuncScanState *node) |
void | ExecReScanTableFuncScan (TableFuncScanState *node) |
void ExecEndTableFuncScan | ( | TableFuncScanState * | node | ) |
Definition at line 220 of file nodeTableFuncscan.c.
References tuplestore_end(), and TableFuncScanState::tupstore.
Referenced by ExecEndNode().
TableFuncScanState* ExecInitTableFuncScan | ( | TableFuncScan * | node, |
EState * | estate, | ||
int | eflags | ||
) |
Definition at line 111 of file nodeTableFuncscan.c.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, Assert, BuildDescFromLists(), TableFuncScanState::coldefexprs, TableFuncScanState::colexprs, TableFunc::colexprs, TableFuncScanState::colvalexprs, CurrentMemoryContext, TableFuncScanState::docexpr, TableFunc::docexpr, EXEC_FLAG_MARK, ExecAssignExprContext(), ExecAssignScanProjectionInfo(), ExecInitExpr(), ExecInitExprList(), ExecInitQual(), ExecInitResultTypeTL(), ExecInitScanTupleSlot(), PlanState::ExecProcNode, ExecTableFuncScan(), fmgr_info(), TableFunc::functype, getTypeInputInfo(), i, TableFuncScanState::in_functions, innerPlan, JsonbTableRoutine, makeNode, TupleDescData::natts, TableFuncScanState::notnulls, TableFuncScanState::ns_names, TableFuncScanState::ns_uris, TableFuncScanState::opaque, outerPlan, palloc(), TableFuncScanState::passingvalexprs, TableFuncScanState::perTableCxt, PlanState::plan, ScanState::ps, PlanState::qual, TableFuncScanState::routine, TableFuncScanState::rowexpr, TableFunc::rowexpr, TableFuncScan::scan, TableFuncScanState::ss, PlanState::state, TableFuncScan::tablefunc, TFT_XMLTABLE, TTSOpsMinimalTuple, TupleDescAttr, TableFuncScanState::typioparams, and XmlTableRoutine.
Referenced by ExecInitNode().
void ExecReScanTableFuncScan | ( | TableFuncScanState * | node | ) |
Definition at line 237 of file nodeTableFuncscan.c.
References PlanState::chgParam, ExecClearTuple(), ExecScanReScan(), ScanState::ps, PlanState::ps_ResultTupleSlot, TableFuncScanState::ss, tuplestore_end(), tuplestore_rescan(), and TableFuncScanState::tupstore.
Referenced by ExecReScan().
|
static |
Definition at line 97 of file nodeTableFuncscan.c.
References castNode, ExecScan(), TableFuncScanState::ss, TableFuncNext(), and TableFuncRecheck().
Referenced by ExecInitTableFuncScan().
|
static |
Definition at line 54 of file nodeTableFuncscan.c.
References ScanState::ps, PlanState::ps_ExprContext, TableFuncScanState::ss, ScanState::ss_ScanTupleSlot, tfuncFetchRows(), tuplestore_gettupleslot(), and TableFuncScanState::tupstore.
Referenced by ExecTableFuncScan().
|
static |
Definition at line 81 of file nodeTableFuncscan.c.
Referenced by ExecTableFuncScan().
|
static |
Definition at line 268 of file nodeTableFuncscan.c.
References Assert, TableFuncRoutine::DestroyOpaque, TableFuncScanState::docexpr, ExprContext::ecxt_per_query_memory, ExecEvalExpr(), TableFuncRoutine::InitOpaque, MemoryContextReset(), MemoryContextSwitchTo(), TupleDescData::natts, TableFuncScanState::opaque, TableFuncScanState::ordinal, TableFuncScanState::perTableCxt, PG_CATCH, PG_END_TRY, PG_RE_THROW, PG_TRY, TableFuncScanState::routine, TableFuncScanState::ss, ScanState::ss_ScanTupleSlot, tfuncInitialize(), tfuncLoadRows(), TupleTableSlot::tts_tupleDescriptor, tuplestore_begin_heap(), TableFuncScanState::tupstore, value, and work_mem.
Referenced by TableFuncNext().
|
static |
Definition at line 340 of file nodeTableFuncscan.c.
References TableFuncScanState::colexprs, ereport, errcode(), errdetail(), errmsg(), ERROR, ExecEvalExpr(), forboth, lfirst, lfirst_node, NameStr, TableFuncScanState::ns_names, TableFuncScanState::ns_uris, PlanState::plan, ScanState::ps, TableFuncScanState::routine, TableFuncScanState::rowexpr, TableFuncRoutine::SetColumnFilter, TableFuncRoutine::SetDocument, TableFuncRoutine::SetNamespace, TableFuncRoutine::SetRowFilter, TableFuncScanState::ss, ScanState::ss_ScanTupleSlot, strVal, TextDatumGetCString, TupleTableSlot::tts_tupleDescriptor, TupleDescAttr, and value.
Referenced by tfuncFetchRows().
|
static |
Definition at line 435 of file nodeTableFuncscan.c.
References bms_is_member(), CHECK_FOR_INTERRUPTS, TableFuncScanState::coldefexprs, ExprContext::ecxt_per_tuple_memory, ereport, errcode(), errmsg(), ERROR, ExecClearTuple(), ExecEvalExpr(), TableFuncRoutine::FetchRow, TableFuncRoutine::GetValue, Int32GetDatum(), lfirst, list_head(), lnext(), MemoryContextReset(), MemoryContextSwitchTo(), NameStr, TupleDescData::natts, TableFuncScanState::notnulls, TableFuncScanState::ordinal, PlanState::plan, ScanState::ps, TableFuncScanState::routine, TableFuncScanState::ss, ScanState::ss_ScanTupleSlot, TupleTableSlot::tts_isnull, TupleTableSlot::tts_tupleDescriptor, TupleTableSlot::tts_values, TupleDescAttr, tuplestore_putvalues(), TableFuncScanState::tupstore, and values.
Referenced by tfuncFetchRows().