141 for (funcno = 0; funcno < node->
nfuncs; funcno++)
302 scanstate->
eflags = eflags;
309 scanstate->
nfuncs = nfuncs;
313 scanstate->
simple =
false;
425 elog(
ERROR,
"function in FROM has unsupported return type");
470 for (i = 0; i < nfuncs; i++)
476 for (j = 1; j <= colcount; j++)
510 "Table function arguments",
543 for (i = 0; i < node->
nfuncs; i++)
void tuplestore_rescan(Tuplestorestate *state)
void ExecEndFunctionScan(FunctionScanState *node)
TupleDesc CreateTupleDescCopy(TupleDesc tupdesc)
TupleTableSlot * ExecInitExtraTupleSlot(EState *estate)
void ExecInitScanTupleSlot(EState *estate, ScanState *scanstate)
TupleDesc BuildDescFromLists(List *names, List *types, List *typmods, List *collations)
#define ScanDirectionIsForward(direction)
TupleTableSlot * ExecScan(ScanState *node, ExecScanAccessMtd accessMtd, ExecScanRecheckMtd recheckMtd)
ExprContext * ps_ExprContext
void ExecReScanFunctionScan(FunctionScanState *node)
TupleTableSlot * ExecClearTuple(TupleTableSlot *slot)
TupleTableSlot * ExecFunctionScan(FunctionScanState *node)
TupleTableSlot * ss_ScanTupleSlot
TypeFuncClass get_expr_result_type(Node *expr, Oid *resultTypeId, TupleDesc *resultTupleDesc)
void ExecFreeExprContext(PlanState *planstate)
ScanDirection es_direction
#define ALLOCSET_DEFAULT_MINSIZE
void ExecAssignResultTypeFromTL(PlanState *planstate)
TupleTableSlot *(* ExecScanAccessMtd)(ScanState *node)
bool(* ExecScanRecheckMtd)(ScanState *node, TupleTableSlot *slot)
TupleTableSlot * ps_ResultTupleSlot
ExprState * ExecInitExpr(Expr *node, PlanState *parent)
void ExecAssignScanProjectionInfo(ScanState *node)
void ExecInitResultTupleSlot(EState *estate, PlanState *planstate)
void TupleDescCopyEntry(TupleDesc dst, AttrNumber dstAttno, TupleDesc src, AttrNumber srcAttno)
void TupleDescInitEntryCollation(TupleDesc desc, AttrNumber attributeNumber, Oid collationid)
#define EXEC_FLAG_BACKWARD
TupleDesc BlessTupleDesc(TupleDesc tupdesc)
struct FunctionScanPerFuncState FunctionScanPerFuncState
MemoryContext CurrentMemoryContext
void TupleDescInitEntry(TupleDesc desc, AttrNumber attributeNumber, const char *attributeName, Oid oidtypeid, int32 typmod, int attdim)
void slot_getallattrs(TupleTableSlot *slot)
FunctionScanState * ExecInitFunctionScan(FunctionScan *node, EState *estate, int eflags)
static TupleTableSlot * FunctionNext(FunctionScanState *node)
struct FunctionScanPerFuncState * funcstates
MemoryContext AllocSetContextCreate(MemoryContext parent, const char *name, Size minContextSize, Size initBlockSize, Size maxBlockSize)
void ExecSetSlotDescriptor(TupleTableSlot *slot, TupleDesc tupdesc)
#define Int64GetDatumFast(X)
TupleTableSlot * func_slot
Tuplestorestate * ExecMakeTableFunctionResult(ExprState *funcexpr, ExprContext *econtext, MemoryContext argContext, TupleDesc expectedDesc, bool randomAccess)
bool tuplestore_gettupleslot(Tuplestorestate *state, bool forward, bool copy, TupleTableSlot *slot)
#define Assert(condition)
void ExecAssignExprContext(EState *estate, PlanState *planstate)
static int list_length(const List *l)
Oid exprCollation(const Node *expr)
void tuplestore_end(Tuplestorestate *state)
TupleDesc CreateTemplateTupleDesc(int natts, bool hasoid)
bool bms_overlap(const Bitmapset *a, const Bitmapset *b)
static bool FunctionRecheck(FunctionScanState *node, TupleTableSlot *slot)
#define ALLOCSET_DEFAULT_INITSIZE
void ExecScanReScan(ScanState *node)
void ExecAssignScanType(ScanState *scanstate, TupleDesc tupDesc)
#define ALLOCSET_DEFAULT_MAXSIZE
TupleTableSlot * ExecStoreVirtualTuple(TupleTableSlot *slot)