78 elog(
ERROR,
"CTE subplans should not be executed via ExecSubPlan");
80 elog(
ERROR,
"cannot set parent params from subquery");
111 elog(
ERROR,
"hashed subplan with direct correlation not supported");
316 (
errcode(ERRCODE_CARDINALITY_VIOLATION),
317 errmsg(
"more than one row returned by a subquery used as an expression")));
342 (
errcode(ERRCODE_CARDINALITY_VIOLATION),
343 errmsg(
"more than one row returned by a subquery used as an expression")));
396 (
errcode(ERRCODE_CARDINALITY_VIOLATION),
397 errmsg(
"more than one row returned by a subquery used as an expression")));
679 const Oid *collations,
698 for (
i = numCols; --
i >= 0;)
746 int numCols = hashtable->
numCols;
783 for (
i = 1;
i <= ncols;
i++)
803 for (
i = 1;
i <= ncols;
i++)
842 elog(
ERROR,
"subplan \"%s\" was not initialized",
904 Oid *cross_eq_funcoids;
915 "Subplan HashTable Context",
920 "Subplan HashTable Temp Context",
951 elog(
ERROR,
"unrecognized testexpr type: %d",
957 lefttlist = righttlist =
NIL;
966 cross_eq_funcoids = (
Oid *)
palloc(ncols *
sizeof(
Oid));
986 lefttlist =
lappend(lefttlist, tle);
994 righttlist =
lappend(righttlist, tle);
997 cross_eq_funcoids[
i - 1] = opexpr->opfuncid;
1003 NULL, &rhs_eq_oper))
1004 elog(
ERROR,
"could not find compatible hash operator for operator %u",
1010 &left_hashfn, &right_hashfn))
1011 elog(
ERROR,
"could not find hash function for hash operator %u",
1013 fmgr_info(left_hashfn, &lhs_hash_funcs[
i - 1]);
1115 elog(
ERROR,
"ANY/ALL subselect unsupported as initplan");
1117 elog(
ERROR,
"CTE subplans should not be executed via ExecSetParamPlan");
1119 elog(
ERROR,
"correlated subplans should not be executed via ExecSetParamPlan");
1181 (
errcode(ERRCODE_CARDINALITY_VIOLATION),
1182 errmsg(
"more than one row returned by a subquery used as an expression")));
1308 elog(
ERROR,
"direct correlated subquery unsupported as initplan");
1310 elog(
ERROR,
"setParam list of initplan is empty");
1312 elog(
ERROR,
"extParam set of initplan is empty");
ArrayBuildStateAny * initArrayResultAny(Oid input_type, MemoryContext rcontext, bool subcontext)
ArrayBuildStateAny * accumArrayResultAny(ArrayBuildStateAny *astate, Datum dvalue, bool disnull, Oid input_type, MemoryContext rcontext)
Datum makeArrayResultAny(ArrayBuildStateAny *astate, MemoryContext rcontext, bool release)
int bms_next_member(const Bitmapset *a, int prevbit)
Bitmapset * bms_add_member(Bitmapset *a, int x)
#define Assert(condition)
long clamp_cardinality_to_long(Cardinality x)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
void ExecReScan(PlanState *node)
ExprState * ExecBuildHash32FromAttrs(TupleDesc desc, const TupleTableSlotOps *ops, FmgrInfo *hashfunctions, Oid *collations, int numCols, AttrNumber *keyColIdx, PlanState *parent, uint32 init_value)
ExprState * ExecInitExpr(Expr *node, PlanState *parent)
ProjectionInfo * ExecBuildProjectionInfo(List *targetList, ExprContext *econtext, TupleTableSlot *slot, PlanState *parent, TupleDesc inputDesc)
ExprState * ExecBuildGroupingEqual(TupleDesc ldesc, TupleDesc rdesc, const TupleTableSlotOps *lops, const TupleTableSlotOps *rops, int numCols, const AttrNumber *keyColIdx, const Oid *eqfunctions, const Oid *collations, PlanState *parent)
TupleHashEntry LookupTupleHashEntry(TupleHashTable hashtable, TupleTableSlot *slot, bool *isnew, uint32 *hash)
TupleHashEntry FindTupleHashEntry(TupleHashTable hashtable, TupleTableSlot *slot, ExprState *eqcomp, ExprState *hashexpr)
TupleHashTable BuildTupleHashTable(PlanState *parent, TupleDesc inputDesc, const TupleTableSlotOps *inputOps, int numCols, AttrNumber *keyColIdx, const Oid *eqfuncoids, FmgrInfo *hashfunctions, Oid *collations, long nbuckets, Size additionalsize, MemoryContext metacxt, MemoryContext tablecxt, MemoryContext tempcxt, bool use_variable_hash_iv)
void ResetTupleHashTable(TupleHashTable hashtable)
const TupleTableSlotOps TTSOpsVirtual
TupleTableSlot * ExecStoreMinimalTuple(MinimalTuple mtup, TupleTableSlot *slot, bool shouldFree)
TupleTableSlot * ExecInitExtraTupleSlot(EState *estate, TupleDesc tupledesc, const TupleTableSlotOps *tts_ops)
const TupleTableSlotOps TTSOpsMinimalTuple
TupleDesc ExecTypeFromTL(List *targetList)
ExprContext * CreateExprContext(EState *estate)
#define ScanTupleHashTable(htable, iter)
#define TermTupleHashIterator(iter)
#define InitTupleHashIterator(htable, iter)
tuplehash_iterator TupleHashIterator
static TupleTableSlot * ExecProject(ProjectionInfo *projInfo)
#define ResetExprContext(econtext)
static TupleTableSlot * ExecProcNode(PlanState *node)
static Datum ExecEvalExprSwitchContext(ExprState *state, ExprContext *econtext, bool *isNull)
Datum FunctionCall2Coll(FmgrInfo *flinfo, Oid collation, Datum arg1, Datum arg2)
void fmgr_info(Oid functionId, FmgrInfo *finfo)
#define fmgr_info_set_expr(expr, finfo)
void heap_freetuple(HeapTuple htup)
static Datum heap_getattr(HeapTuple tup, int attnum, TupleDesc tupleDesc, bool *isnull)
List * lappend(List *list, void *datum)
bool get_compatible_hash_operators(Oid opno, Oid *lhs_opno, Oid *rhs_opno)
RegProcedure get_opcode(Oid opno)
bool get_op_hash_functions(Oid opno, RegProcedure *lhs_procno, RegProcedure *rhs_procno)
TargetEntry * makeTargetEntry(Expr *expr, AttrNumber resno, char *resname, bool resjunk)
void MemoryContextReset(MemoryContext context)
void pfree(void *pointer)
MemoryContext CurrentMemoryContext
#define AllocSetContextCreate
#define ALLOCSET_DEFAULT_SIZES
#define ALLOCSET_SMALL_SIZES
#define CHECK_FOR_INTERRUPTS()
static bool is_andclause(const void *clause)
static Datum ExecHashSubPlan(SubPlanState *node, ExprContext *econtext, bool *isNull)
SubPlanState * ExecInitSubPlan(SubPlan *subplan, PlanState *parent)
static void buildSubPlanHash(SubPlanState *node, ExprContext *econtext)
static bool execTuplesUnequal(TupleTableSlot *slot1, TupleTableSlot *slot2, int numCols, AttrNumber *matchColIdx, FmgrInfo *eqfunctions, const Oid *collations, MemoryContext evalContext)
void ExecReScanSetParamPlan(SubPlanState *node, PlanState *parent)
static bool slotNoNulls(TupleTableSlot *slot)
static Datum ExecScanSubPlan(SubPlanState *node, ExprContext *econtext, bool *isNull)
void ExecSetParamPlan(SubPlanState *node, ExprContext *econtext)
void ExecSetParamPlanMulti(const Bitmapset *params, ExprContext *econtext)
static bool slotAllNulls(TupleTableSlot *slot)
Datum ExecSubPlan(SubPlanState *node, ExprContext *econtext, bool *isNull)
static bool findPartialMatch(TupleHashTable hashtable, TupleTableSlot *slot, FmgrInfo *eqfunctions)
#define IsA(nodeptr, _type_)
#define castNode(_type_, nodeptr)
#define lfirst_node(type, lc)
static int list_length(const List *l)
static void * list_nth(const List *list, int n)
static bool DatumGetBool(Datum X)
static Datum PointerGetDatum(const void *X)
static Datum BoolGetDatum(bool X)
static Pointer DatumGetPointer(Datum X)
MemoryContextSwitchTo(old_ctx)
ParamExecData * es_param_exec_vals
MemoryContext es_query_cxt
ScanDirection es_direction
ParamExecData * ecxt_param_exec_vals
MemoryContext ecxt_per_query_memory
TupleTableSlot * resultslot
ExprContext * pi_exprContext
ExprState * lhs_hash_expr
MemoryContext hashtablecxt
ExprContext * innerecontext
FmgrInfo * tab_hash_funcs
MemoryContext hashtempcxt
struct PlanState * planstate
ProjectionInfo * projLeft
ProjectionInfo * projRight
struct PlanState * parent
TupleTableSlot * tableslot
TupleDesc tts_tupleDescriptor
static FormData_pg_attribute * TupleDescAttr(TupleDesc tupdesc, int i)
static HeapTuple ExecCopySlotHeapTuple(TupleTableSlot *slot)
static Datum slot_getattr(TupleTableSlot *slot, int attnum, bool *isnull)
static TupleTableSlot * ExecClearTuple(TupleTableSlot *slot)
static bool slot_attisnull(TupleTableSlot *slot, int attnum)