344 int colcount = rtfunc->funccolcount;
373 if (rtfunc->funccolnames !=
NIL)
376 rtfunc->funccoltypes,
377 rtfunc->funccoltypmods,
378 rtfunc->funccolcollations);
421 elog(
ERROR,
"function in FROM has unsupported return type");
467 for (
i = 0;
i < nfuncs;
i++)
470 int colcount =
scanstate->funcstates[
i].colcount;
473 for (
j = 1;
j <= colcount;
j++)
517 "Table function arguments",
bool bms_overlap(const Bitmapset *a, const Bitmapset *b)
#define Assert(condition)
ExprState * ExecInitQual(List *qual, PlanState *parent)
Tuplestorestate * ExecMakeTableFunctionResult(SetExprState *setexpr, ExprContext *econtext, MemoryContext argContext, TupleDesc expectedDesc, bool randomAccess)
SetExprState * ExecInitTableFunctionResult(Expr *expr, ExprContext *econtext, PlanState *parent)
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)
#define EXEC_FLAG_BACKWARD
bool(* ExecScanRecheckMtd)(ScanState *node, TupleTableSlot *slot)
TupleTableSlot *(* ExecScanAccessMtd)(ScanState *node)
#define palloc_array(type, count)
TypeFuncClass get_expr_result_type(Node *expr, Oid *resultTypeId, TupleDesc *resultTupleDesc)
@ TYPEFUNC_COMPOSITE_DOMAIN
MemoryContext CurrentMemoryContext
#define AllocSetContextCreate
#define ALLOCSET_DEFAULT_SIZES
Oid exprCollation(const Node *expr)
static TupleTableSlot * ExecFunctionScan(PlanState *pstate)
FunctionScanState * ExecInitFunctionScan(FunctionScan *node, EState *estate, int eflags)
static TupleTableSlot * FunctionNext(FunctionScanState *node)
void ExecReScanFunctionScan(FunctionScanState *node)
void ExecEndFunctionScan(FunctionScanState *node)
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
TupleTableSlot * ss_ScanTupleSlot
TupleDesc CreateTemplateTupleDesc(int natts)
TupleDesc CreateTupleDescCopy(TupleDesc tupdesc)
TupleDesc BuildDescFromLists(const List *names, const List *types, const List *typmods, const 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)