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");
324 (
errcode(ERRCODE_CARDINALITY_VIOLATION),
325 errmsg(
"more than one row returned by a subquery used as an expression")));
350 (
errcode(ERRCODE_CARDINALITY_VIOLATION),
351 errmsg(
"more than one row returned by a subquery used as an expression")));
404 (
errcode(ERRCODE_CARDINALITY_VIOLATION),
405 errmsg(
"more than one row returned by a subquery used as an expression")));
680 const Oid *collations,
699 for (
i = numCols; --
i >= 0;)
747 int numCols = hashtable->
numCols;
784 for (
i = 1;
i <= ncols;
i++)
804 for (
i = 1;
i <= ncols;
i++)
839 elog(
ERROR,
"subplan \"%s\" was not initialized",
904 Oid *cross_eq_funcoids;
914 "Subplan HashTable Context",
919 "Subplan HashTable Temp Context",
950 elog(
ERROR,
"unrecognized testexpr type: %d",
956 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",
1012 &left_hashfn, &right_hashfn))
1013 elog(
ERROR,
"could not find hash function for hash operator %u",
1107 elog(
ERROR,
"ANY/ALL subselect unsupported as initplan");
1109 elog(
ERROR,
"CTE subplans should not be executed via ExecSetParamPlan");
1111 elog(
ERROR,
"correlated subplans should not be executed via ExecSetParamPlan");
1173 (
errcode(ERRCODE_CARDINALITY_VIOLATION),
1174 errmsg(
"more than one row returned by a subquery used as an expression")));
1300 elog(
ERROR,
"direct correlated subquery unsupported as initplan");
1302 elog(
ERROR,
"setParam list of initplan is empty");
1304 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)
long clamp_cardinality_to_long(Cardinality x)
elog(ERROR, "%s: %s", p2, msg)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
void ExecReScan(PlanState *node)
List * ExecInitExprList(List *nodes, PlanState *parent)
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, FmgrInfo *hashfunctions)
TupleHashTable BuildTupleHashTableExt(PlanState *parent, TupleDesc inputDesc, 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 Datum ExecEvalExprSwitchContext(ExprState *state, ExprContext *econtext, bool *isNull)
static TupleTableSlot * ExecProcNode(PlanState *node)
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)
Assert(fmt[strlen(fmt) - 1] !='\n')
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)
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)
SubPlanState * ExecInitSubPlan(SubPlan *subplan, PlanState *parent)
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)
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
#define lfirst_node(type, lc)
static int list_length(const List *l)
#define forboth(cell1, list1, cell2, list2)
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)
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
MemoryContext hashtablecxt
ExprContext * innerecontext
FmgrInfo * tab_hash_funcs
MemoryContext hashtempcxt
FmgrInfo * lhs_hash_funcs
struct PlanState * planstate
ProjectionInfo * projLeft
ProjectionInfo * projRight
struct PlanState * parent
TupleTableSlot * tableslot
TupleDesc tts_tupleDescriptor
#define TupleDescAttr(tupdesc, i)
static TupleTableSlot * ExecClearTuple(TupleTableSlot *slot)
static HeapTuple ExecCopySlotHeapTuple(TupleTableSlot *slot)
static Datum slot_getattr(TupleTableSlot *slot, int attnum, bool *isnull)
static bool slot_attisnull(TupleTableSlot *slot, int attnum)