PostgreSQL Source Code git master
|
#include "postgres.h"
#include "access/htup_details.h"
#include "catalog/objectaccess.h"
#include "catalog/pg_proc.h"
#include "funcapi.h"
#include "miscadmin.h"
#include "nodes/nodeFuncs.h"
#include "parser/parse_coerce.h"
#include "pgstat.h"
#include "utils/acl.h"
#include "utils/builtins.h"
#include "utils/lsyscache.h"
#include "utils/memutils.h"
#include "utils/typcache.h"
Go to the source code of this file.
|
static |
Definition at line 834 of file execSRF.c.
References arg, FunctionCallInfoBaseData::args, Assert, ExecEvalExpr(), i, NullableDatum::isnull, lfirst, FunctionCallInfoBaseData::nargs, and NullableDatum::value.
Referenced by ExecMakeFunctionResultSet(), and ExecMakeTableFunctionResult().
SetExprState * ExecInitFunctionResultSet | ( | Expr * | expr, |
ExprContext * | econtext, | ||
PlanState * | parent | ||
) |
Definition at line 444 of file execSRF.c.
References FuncExpr::args, OpExpr::args, Assert, ExprContext::ecxt_per_query_memory, elog, ERROR, ExecInitExprList(), FuncExpr::funcid, init_sexpr(), InvalidOid, IsA, makeNode, and nodeTag.
Referenced by ExecInitProjectSet().
SetExprState * ExecInitTableFunctionResult | ( | Expr * | expr, |
ExprContext * | econtext, | ||
PlanState * | parent | ||
) |
Definition at line 56 of file execSRF.c.
References FuncExpr::args, ExprContext::ecxt_per_query_memory, ExecInitExpr(), ExecInitExprList(), FuncExpr::funcid, init_sexpr(), InvalidOid, IsA, and makeNode.
Referenced by ExecInitFunctionScan().
Datum ExecMakeFunctionResultSet | ( | SetExprState * | fcache, |
ExprContext * | econtext, | ||
MemoryContext | argContext, | ||
bool * | isNull, | ||
ExprDoneCond * | isDone | ||
) |
Definition at line 497 of file execSRF.c.
References ReturnSetInfo::allowedModes, FunctionCallInfoBaseData::args, SetExprState::args, check_stack_depth(), ReturnSetInfo::econtext, ereport, errcode(), errmsg(), ERROR, ExecEvalFuncArgs(), ExecFetchSlotHeapTupleDatum(), ExecPrepareTuplestoreResult(), ReturnSetInfo::expectedDesc, ExprEndResult, ExprMultipleResult, ExprSingleResult, SetExprState::fcinfo, FmgrInfo::fn_strict, SetExprState::func, SetExprState::funcResultDesc, SetExprState::funcResultSlot, SetExprState::funcResultStore, SetExprState::funcReturnsTuple, FunctionCallInvoke, i, ReturnSetInfo::isDone, FunctionCallInfoBaseData::isnull, NullableDatum::isnull, MemoryContextSwitchTo(), FunctionCallInfoBaseData::nargs, pgstat_end_function_usage(), pgstat_init_function_usage(), PointerGetDatum(), RegisterExprContextCallback(), FunctionCallInfoBaseData::resultinfo, ReturnSetInfo::returnMode, SetExprState::setArgsValid, ReturnSetInfo::setDesc, ReturnSetInfo::setResult, SFRM_Materialize, SFRM_ValuePerCall, SetExprState::shutdown_reg, ShutdownSetExpr(), slot_getattr(), TupleTableSlot::tts_mcxt, tuplestore_end(), tuplestore_gettupleslot(), and ReturnSetInfo::type.
Referenced by ExecProjectSRF().
Tuplestorestate * ExecMakeTableFunctionResult | ( | SetExprState * | setexpr, |
ExprContext * | econtext, | ||
MemoryContext | argContext, | ||
TupleDesc | expectedDesc, | ||
bool | randomAccess | ||
) |
Definition at line 101 of file execSRF.c.
References ReturnSetInfo::allowedModes, FunctionCallInfoBaseData::args, SetExprState::args, Assert, CHECK_FOR_INTERRUPTS, CreateTemplateTupleDesc(), CurrentMemoryContext, DatumGetHeapTupleHeader, ReturnSetInfo::econtext, ExprContext::ecxt_per_query_memory, ExprContext::ecxt_per_tuple_memory, SetExprState::elidedFuncState, ereport, errcode(), errmsg(), ERROR, ExecEvalExpr(), ExecEvalFuncArgs(), ReturnSetInfo::expectedDesc, SetExprState::expr, ExprEndResult, ExprMultipleResult, ExprSingleResult, exprType(), SetExprState::fcinfo, FmgrInfo::fn_strict, FunctionCallInfoBaseData::fncollation, FreeTupleDesc(), SetExprState::func, SetExprState::funcReturnsSet, FunctionCallInvoke, HeapTupleHeaderGetDatumLength, HeapTupleHeaderGetTypeId, HeapTupleHeaderGetTypMod, i, InitFunctionCallInfoData, InvalidOid, ReturnSetInfo::isDone, FunctionCallInfoBaseData::isnull, NullableDatum::isnull, list_length(), lookup_rowtype_tupdesc_copy(), MemoryContextReset(), MemoryContextSwitchTo(), FunctionCallInfoBaseData::nargs, TupleDescData::natts, palloc(), pgstat_end_function_usage(), pgstat_init_function_usage(), ResetExprContext, ReturnSetInfo::returnMode, ReturnSetInfo::setDesc, ReturnSetInfo::setResult, SFRM_Materialize, SFRM_Materialize_Preferred, SFRM_Materialize_Random, SFRM_ValuePerCall, SizeForFunctionCallInfo, HeapTupleData::t_data, HeapTupleData::t_len, TupleDescData::tdrefcount, TupleDescData::tdtypeid, TupleDescData::tdtypmod, tupledesc_match(), TupleDescInitEntry(), tuplestore_begin_heap(), tuplestore_puttuple(), tuplestore_putvalues(), ReturnSetInfo::type, type_is_rowtype(), and work_mem.
Referenced by FunctionNext().
|
static |
Definition at line 864 of file execSRF.c.
References CreateTupleDescCopy(), ereport, errcode(), errmsg(), ERROR, FmgrInfo::fn_mcxt, FreeTupleDesc(), SetExprState::func, SetExprState::funcResultDesc, SetExprState::funcResultSlot, SetExprState::funcResultStore, MakeSingleTupleTableSlot(), MemoryContextSwitchTo(), PointerGetDatum(), RegisterExprContextCallback(), SetExprState::shutdown_reg, ShutdownSetExpr(), TupleDescData::tdrefcount, TTSOpsMinimalTuple, and tupledesc_match().
Referenced by ExecMakeFunctionResultSet().
|
static |
Definition at line 696 of file execSRF.c.
References ACL_EXECUTE, aclcheck_error(), ACLCHECK_OK, SetExprState::args, Assert, CreateTemplateTupleDesc(), CreateTupleDescCopy(), ereport, errcode(), errmsg(), errmsg_plural(), ERROR, executor_errposition(), SetExprState::expr, exprLocation(), SetExprState::fcinfo, fmgr_info_cxt(), fmgr_info_set_expr, FmgrInfo::fn_expr, FmgrInfo::fn_retset, SetExprState::func, FUNC_MAX_ARGS, SetExprState::funcResultDesc, SetExprState::funcResultSlot, SetExprState::funcResultStore, SetExprState::funcReturnsSet, SetExprState::funcReturnsTuple, get_expr_result_type(), get_func_name(), GetUserId(), InitFunctionCallInfoData, InvokeFunctionExecuteHook, list_length(), MemoryContextSwitchTo(), object_aclcheck(), OBJECT_FUNCTION, palloc(), SetExprState::shutdown_reg, SizeForFunctionCallInfo, PlanState::state, TupleDescInitEntry(), TYPEFUNC_COMPOSITE, TYPEFUNC_COMPOSITE_DOMAIN, TYPEFUNC_RECORD, and TYPEFUNC_SCALAR.
Referenced by ExecInitFunctionResultSet(), and ExecInitTableFunctionResult().
|
static |
Definition at line 810 of file execSRF.c.
References arg, castNode, DatumGetPointer(), ExecClearTuple(), SetExprState::funcResultSlot, SetExprState::funcResultStore, SetExprState::setArgsValid, SetExprState::shutdown_reg, and tuplestore_end().
Referenced by ExecMakeFunctionResultSet(), and ExecPrepareTuplestoreResult().
Definition at line 943 of file execSRF.c.
References ereport, errcode(), errdetail(), errdetail_plural(), errmsg(), ERROR, format_type_be(), i, IsBinaryCoercible(), TupleDescData::natts, and TupleDescAttr().
Referenced by ExecMakeTableFunctionResult(), and ExecPrepareTuplestoreResult().