141 for (funcno = 0; funcno < node->
nfuncs; funcno++)
305 scanstate->
eflags = eflags;
312 scanstate->
nfuncs = nfuncs;
316 scanstate->
simple =
false;
345 int colcount = rtfunc->funccolcount;
400 rtfunc->funccoltypes,
401 rtfunc->funccoltypmods,
402 rtfunc->funccolcollations);
414 elog(
ERROR,
"function in FROM has unsupported return type");
459 for (
i = 0;
i < nfuncs;
i++)
465 for (
j = 1;
j <= colcount;
j++)
509 "Table function arguments",
bool bms_overlap(const Bitmapset *a, const Bitmapset *b)
elog(ERROR, "%s: %s", p2, msg)
ExprState * ExecInitQual(List *qual, PlanState *parent)
SetExprState * ExecInitTableFunctionResult(Expr *expr, ExprContext *econtext, PlanState *parent)
Tuplestorestate * ExecMakeTableFunctionResult(SetExprState *setexpr, ExprContext *econtext, MemoryContext argContext, TupleDesc expectedDesc, bool randomAccess)
TupleTableSlot * ExecScan(ScanState *node, ExecScanAccessMtd accessMtd, ExecScanRecheckMtd recheckMtd)
void ExecAssignScanProjectionInfo(ScanState *node)
void ExecScanReScan(ScanState *node)
TupleDesc BlessTupleDesc(TupleDesc tupdesc)
TupleTableSlot * ExecStoreVirtualTuple(TupleTableSlot *slot)
void ExecInitScanTupleSlot(EState *estate, ScanState *scanstate, TupleDesc tupledesc, const TupleTableSlotOps *tts_ops)
void ExecInitResultTypeTL(PlanState *planstate)
TupleTableSlot * ExecInitExtraTupleSlot(EState *estate, TupleDesc tupledesc, const TupleTableSlotOps *tts_ops)
const TupleTableSlotOps TTSOpsMinimalTuple
void ExecAssignExprContext(EState *estate, PlanState *planstate)
void ExecFreeExprContext(PlanState *planstate)
#define EXEC_FLAG_BACKWARD
TupleTableSlot *(* ExecScanAccessMtd)(ScanState *node)
bool(* ExecScanRecheckMtd)(ScanState *node, TupleTableSlot *slot)
TypeFuncClass get_expr_result_type(Node *expr, Oid *resultTypeId, TupleDesc *resultTupleDesc)
@ TYPEFUNC_COMPOSITE_DOMAIN
if(TABLE==NULL||TABLE_index==NULL)
Assert(fmt[strlen(fmt) - 1] !='\n')
MemoryContext CurrentMemoryContext
#define AllocSetContextCreate
#define ALLOCSET_DEFAULT_SIZES
Oid exprCollation(const Node *expr)
FunctionScanState * ExecInitFunctionScan(FunctionScan *node, EState *estate, int eflags)
static TupleTableSlot * FunctionNext(FunctionScanState *node)
struct FunctionScanPerFuncState FunctionScanPerFuncState
void ExecReScanFunctionScan(FunctionScanState *node)
void ExecEndFunctionScan(FunctionScanState *node)
static TupleTableSlot * ExecFunctionScan(PlanState *pstate)
static bool FunctionRecheck(FunctionScanState *node, TupleTableSlot *slot)
#define castNode(_type_, nodeptr)
static int list_length(const List *l)
#define Int64GetDatumFast(X)
#define ScanDirectionIsForward(direction)
ScanDirection es_direction
TupleTableSlot * func_slot
struct FunctionScanPerFuncState * funcstates
ExprContext * ps_ExprContext
TupleTableSlot * ps_ResultTupleSlot
ExecProcNodeMtd ExecProcNode
TupleTableSlot * ss_ScanTupleSlot
TupleDesc CreateTemplateTupleDesc(int natts)
TupleDesc CreateTupleDescCopy(TupleDesc tupdesc)
TupleDesc BuildDescFromLists(List *names, List *types, List *typmods, List *collations)
void TupleDescInitEntryCollation(TupleDesc desc, AttrNumber attributeNumber, Oid collationid)
void TupleDescInitEntry(TupleDesc desc, AttrNumber attributeNumber, const char *attributeName, Oid oidtypeid, int32 typmod, int attdim)
void TupleDescCopyEntry(TupleDesc dst, AttrNumber dstAttno, TupleDesc src, AttrNumber srcAttno)
bool tuplestore_gettupleslot(Tuplestorestate *state, bool forward, bool copy, TupleTableSlot *slot)
void tuplestore_rescan(Tuplestorestate *state)
void tuplestore_end(Tuplestorestate *state)
static TupleTableSlot * ExecClearTuple(TupleTableSlot *slot)
static void slot_getallattrs(TupleTableSlot *slot)