171 "TableFunc per value context",
201 for (
i = 0;
i < tupdesc->
natts;
i++)
317 if (tstate->
opaque != NULL)
325 if (tstate->
opaque != NULL)
369 (
errcode(ERRCODE_NULL_VALUE_NOT_ALLOWED),
370 errmsg(
"namespace URI must not be null")));
374 ns_name = ns_node ?
strVal(ns_node) : NULL;
388 (
errcode(ERRCODE_NULL_VALUE_NOT_ALLOWED),
389 errmsg(
"row filter expression must not be null")));
406 if (colno != ordinalitycol)
415 (
errcode(ERRCODE_NULL_VALUE_NOT_ALLOWED),
416 errmsg(
"column filter expression must not be null"),
417 errdetail(
"Filter for column \"%s\" is null.",
422 colfilter =
NameStr(att->attname);
442 int natts = tupdesc->
natts;
473 for (colno = 0; colno < natts; colno++)
477 if (colno == ordinalitycol)
481 nulls[colno] =
false;
494 if (isnull && cell != NULL)
498 if (coldefexpr != NULL)
506 (
errcode(ERRCODE_NULL_VALUE_NOT_ALLOWED),
507 errmsg(
"null is not allowed in column \"%s\"",
510 nulls[colno] = isnull;
bool bms_is_member(int x, const Bitmapset *a)
static Datum values[MAXATTR]
#define TextDatumGetCString(d)
#define Assert(condition)
int errdetail(const char *fmt,...)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
List * ExecInitExprList(List *nodes, PlanState *parent)
ExprState * ExecInitQual(List *qual, PlanState *parent)
ExprState * ExecInitExpr(Expr *node, PlanState *parent)
TupleTableSlot * ExecScan(ScanState *node, ExecScanAccessMtd accessMtd, ExecScanRecheckMtd recheckMtd)
void ExecAssignScanProjectionInfo(ScanState *node)
void ExecScanReScan(ScanState *node)
void ExecInitScanTupleSlot(EState *estate, ScanState *scanstate, TupleDesc tupledesc, const TupleTableSlotOps *tts_ops)
void ExecInitResultTypeTL(PlanState *planstate)
const TupleTableSlotOps TTSOpsMinimalTuple
void ExecAssignExprContext(EState *estate, PlanState *planstate)
TupleTableSlot *(* ExecScanAccessMtd)(ScanState *node)
bool(* ExecScanRecheckMtd)(ScanState *node, TupleTableSlot *slot)
static Datum ExecEvalExpr(ExprState *state, ExprContext *econtext, bool *isNull)
void fmgr_info(Oid functionId, FmgrInfo *finfo)
const TableFuncRoutine JsonbTableRoutine
void getTypeInputInfo(Oid type, Oid *typInput, Oid *typIOParam)
void MemoryContextReset(MemoryContext context)
MemoryContext CurrentMemoryContext
#define AllocSetContextCreate
#define ALLOCSET_DEFAULT_SIZES
#define CHECK_FOR_INTERRUPTS()
void ExecReScanTableFuncScan(TableFuncScanState *node)
void ExecEndTableFuncScan(TableFuncScanState *node)
TableFuncScanState * ExecInitTableFuncScan(TableFuncScan *node, EState *estate, int eflags)
static bool TableFuncRecheck(TableFuncScanState *node, TupleTableSlot *slot)
static void tfuncInitialize(TableFuncScanState *tstate, ExprContext *econtext, Datum doc)
static TupleTableSlot * ExecTableFuncScan(PlanState *pstate)
static void tfuncLoadRows(TableFuncScanState *tstate, ExprContext *econtext)
static void tfuncFetchRows(TableFuncScanState *tstate, ExprContext *econtext)
static TupleTableSlot * TableFuncNext(TableFuncScanState *node)
#define castNode(_type_, nodeptr)
FormData_pg_attribute * Form_pg_attribute
#define lfirst_node(type, lc)
#define forboth(cell1, list1, cell2, list2)
static ListCell * list_head(const List *l)
static ListCell * lnext(const List *l, const ListCell *c)
static Datum Int32GetDatum(int32 X)
MemoryContextSwitchTo(old_ctx)
MemoryContext ecxt_per_tuple_memory
MemoryContext ecxt_per_query_memory
ExprContext * ps_ExprContext
TupleTableSlot * ps_ResultTupleSlot
ExecProcNodeMtd ExecProcNode
TupleTableSlot * ss_ScanTupleSlot
void(* SetRowFilter)(struct TableFuncScanState *state, const char *path)
bool(* FetchRow)(struct TableFuncScanState *state)
void(* SetNamespace)(struct TableFuncScanState *state, const char *name, const char *uri)
Datum(* GetValue)(struct TableFuncScanState *state, int colnum, Oid typid, int32 typmod, bool *isnull)
void(* InitOpaque)(struct TableFuncScanState *state, int natts)
void(* SetColumnFilter)(struct TableFuncScanState *state, const char *path, int colnum)
void(* SetDocument)(struct TableFuncScanState *state, Datum value)
void(* DestroyOpaque)(struct TableFuncScanState *state)
MemoryContext perTableCxt
Tuplestorestate * tupstore
const struct TableFuncRoutine * routine
TupleDesc tts_tupleDescriptor
TupleDesc BuildDescFromLists(const List *names, const List *types, const List *typmods, const List *collations)
#define TupleDescAttr(tupdesc, i)
bool tuplestore_gettupleslot(Tuplestorestate *state, bool forward, bool copy, TupleTableSlot *slot)
Tuplestorestate * tuplestore_begin_heap(bool randomAccess, bool interXact, int maxKBytes)
void tuplestore_rescan(Tuplestorestate *state)
void tuplestore_putvalues(Tuplestorestate *state, TupleDesc tdesc, const Datum *values, const bool *isnull)
void tuplestore_end(Tuplestorestate *state)
static TupleTableSlot * ExecClearTuple(TupleTableSlot *slot)
const TableFuncRoutine XmlTableRoutine