57#include "utils/fmgroids.h"
186 int nargs,
List *args);
264 lists->numWindowFuncs = 0;
265 lists->maxWinRef = maxWinRef;
282 elog(
ERROR,
"WindowFunc contains out-of-range winref %u",
287 lists->numWindowFuncs++;
326 if (expr->funcretset)
458 if (
cnst->constisnull)
795 root->glob->paramExecTypes ==
NIL)
809 foreach(l,
proot->init_plans)
1217#define CCDN_CASETESTEXPR_OK 0x0001
1523 foreach(l, (
List *) node)
1582 foreach(l, expr->
args)
1707 if (
phv->phlevelsup == 0 &&
1776 foreach(l, (
List *) node)
1840 foreach(l, expr->
args)
1975 foreach(l, (
List *) node)
2026 if (var &&
IsA(var,
Var) &&
2040 if (var &&
IsA(var,
Var) &&
2097 MemSet(&subroot, 0,
sizeof(subroot));
2098 subroot.
parse = query;
2139 if (query->hasGroupRTE)
2229 switch (
j->jointype)
2263 elog(
ERROR,
"unrecognized join type: %d",
2269 elog(
ERROR,
"unrecognized node type: %d",
2319 if (arrayexpr->elements !=
NIL && !arrayexpr->multidims)
2416 elog(
ERROR,
"cannot commute non-binary-operator clause");
2421 elog(
ERROR,
"could not find commutator for operator %u",
2464 if (attr->attisdropped ||
2531#define MIN_ARRAY_SIZE_FOR_HASHED_SAOP 9
2682#define ece_generic_processing(node) \
2683 expression_tree_mutator((Node *) (node), eval_const_expressions_mutator, \
2691#define ece_all_arguments_const(node) \
2692 (!expression_tree_walker((Node *) (node), contain_non_const_walker, NULL))
2695#define ece_evaluate_expr(node) \
2696 ((Node *) evaluate_expr((Expr *) (node), \
2697 exprType((Node *) (node)), \
2698 exprTypmod((Node *) (node)), \
2699 exprCollation((Node *) (node))))
2766 &typLen, &typByVal);
2767 if (
prm->isnull || typByVal)
2779 return (
Node *) con;
2808 elog(
ERROR,
"cache lookup failed for function %u", funcid);
2811 false, expr->wintype,
2822 aggfilter = (
Expr *)
2829 newexpr->wintype = expr->wintype;
2830 newexpr->wincollid = expr->wincollid;
2831 newexpr->inputcollid = expr->inputcollid;
2833 newexpr->aggfilter = aggfilter;
2834 newexpr->runCondition = expr->runCondition;
2836 newexpr->winstar = expr->winstar;
2837 newexpr->winagg = expr->winagg;
2858 expr->funcresulttype,
2868 return (
Node *) simple;
2878 newexpr->funcresulttype = expr->funcresulttype;
2879 newexpr->funcretset = expr->funcretset;
2880 newexpr->funcvariadic = expr->funcvariadic;
2881 newexpr->funcformat = expr->funcformat;
2882 newexpr->funccollid = expr->funccollid;
2883 newexpr->inputcollid = expr->inputcollid;
2911 expr->opresulttype, -1,
2920 return (
Node *) simple;
2933 return (
Node *) simple;
2943 newexpr->opfuncid = expr->opfuncid;
2944 newexpr->opresulttype = expr->opresulttype;
2945 newexpr->opretset = expr->opretset;
2946 newexpr->opcollid = expr->opcollid;
2947 newexpr->inputcollid = expr->inputcollid;
3030 expr->opresulttype, -1,
3082 eqexpr->opfuncid = expr->opfuncid;
3084 eqexpr->opretset = expr->opretset;
3085 eqexpr->opcollid = expr->opcollid;
3086 eqexpr->inputcollid = expr->inputcollid;
3112 nt->argisrow =
false;
3125 newexpr->opfuncid = expr->opfuncid;
3126 newexpr->opresulttype = expr->opresulttype;
3127 newexpr->opretset = expr->opretset;
3128 newexpr->opcollid = expr->opcollid;
3129 newexpr->inputcollid = expr->inputcollid;
3162 return (
Node *) expr;
3181 return (
Node *) saop;
3270 Node *formatted_expr = (
Node *)
jve->formatted_expr;
3280 if (formatted_expr &&
IsA(formatted_expr,
Const))
3281 return formatted_expr;
3286 (
Expr *) formatted_expr,
3401 return (
Node *) simple;
3412 newexpr->resultcollid = expr->resultcollid;
3413 newexpr->coerceformat = expr->coerceformat;
3773 ((
Var *)
arg)->varlevelsup == 0)
3788 ((
Var *)
arg)->varlevelsup);
3790 newvar->varreturningtype = ((
Var *)
arg)->varreturningtype;
3792 newvar->varnullingrels = ((
Var *)
arg)->varnullingrels;
3856 foreach(l, rarg->
args)
3868 if (
carg->constisnull ?
3916 switch (
ntest->nulltesttype)
3925 elog(
ERROR,
"unrecognized nulltesttype: %d",
3926 (
int)
ntest->nulltesttype);
3939 switch (
ntest->nulltesttype)
3948 elog(
ERROR,
"unrecognized nulltesttype: %d",
3949 (
int)
ntest->nulltesttype);
3987 switch (
btest->booltesttype)
4012 elog(
ERROR,
"unrecognized booltesttype: %d",
4013 (
int)
btest->booltesttype);
4028 switch (
btest->booltesttype)
4045 elog(
ERROR,
"unrecognized booltesttype: %d",
4046 (
int)
btest->booltesttype);
4130 newcre->convertformat =
cre->convertformat;
4536 elog(
ERROR,
"cache lookup failed for function %u", funcid);
4575 fexpr.funcid = funcid;
4576 fexpr.funcresulttype = result_type;
4583 fexpr.location = -1;
4633 req.aggref = aggref;
4648 return (
Node *) aggref;
4776 elog(
ERROR,
"unrecognized NotNullSource: %d",
4818 return !((
Const *) expr)->constisnull;
4980 elog(
ERROR,
"proallargtypes is not a 1-D Oid array or it contains nulls");
5037 elog(
ERROR,
"too many function arguments");
5071 foreach(
lc, defaults)
5109 elog(
ERROR,
"not enough default arguments");
5163 elog(
ERROR,
"too many function arguments");
5177 if (rettype != result_type)
5178 elog(
ERROR,
"function's resolved result type changed during planning");
5277 newexpr->funcresulttype = result_type;
5388 fexpr->funcid = funcid;
5389 fexpr->funcresulttype = result_type;
5390 fexpr->funcretset =
false;
5396 fexpr->location = -1;
5407 callback_arg.
prosrc = src;
5512 result_type, rettupdesc,
5580 if (usecounts[
i] == 0)
5586 else if (usecounts[
i] != 1)
5683 context.
nargs = nargs;
5684 context.
args = args;
5859 if (
rte->funcordinality)
5918 "inline_function_in_from",
5936 req.rtfunc = rtfunc;
5952 callback_arg.
prosrc = src;
6011 root->glob->dependsOnRole =
true;
6058 if (!
fexpr->funcretset)
6118 fexpr->inputcollid);
6143 if (rtfunc->funccolnames !=
NIL)
6147 rtfunc->funccoltypes,
6148 rtfunc->funccoltypmods,
6149 rtfunc->funccolcollations);
6175 fexpr->funcresulttype, rettupdesc,
6203 context.
nargs = nargs;
6204 context.
args = args;
6228 context->sublevels_up--;
6513 if (node &&
IsA(node,
Var))
6526 inputcollid != var->varcollid)
6589 elems[
i] =
value->constvalue;
6590 nulls[
i++] =
value->constisnull;
6594 coltype, typlen, typbyval,
typalign);
6611 saopexpr->inputcollid = inputcollid;
Datum querytree(PG_FUNCTION_ARGS)
AclResult object_aclcheck(Oid classid, Oid objectid, Oid roleid, AclMode mode)
#define DatumGetArrayTypeP(X)
ArrayType * construct_md_array(Datum *elems, bool *nulls, int ndims, int *dims, int *lbs, Oid elmtype, int elmlen, bool elmbyval, char elmalign)
int ArrayGetNItems(int ndim, const int *dims)
#define InvalidAttrNumber
Bitmapset * bms_make_singleton(int x)
Bitmapset * bms_int_members(Bitmapset *a, const Bitmapset *b)
Bitmapset * bms_del_members(Bitmapset *a, const Bitmapset *b)
void bms_free(Bitmapset *a)
int bms_num_members(const Bitmapset *a)
bool bms_is_member(int x, const Bitmapset *a)
Bitmapset * bms_add_member(Bitmapset *a, int x)
Bitmapset * bms_add_members(Bitmapset *a, const Bitmapset *b)
BMS_Membership bms_membership(const Bitmapset *a)
Bitmapset * bms_join(Bitmapset *a, Bitmapset *b)
#define TextDatumGetCString(d)
#define Assert(condition)
#define MemSet(start, val, len)
#define OidIsValid(objectId)
memcpy(sums, checksumBaseOffsets, sizeof(checksumBaseOffsets))
static bool contain_subplans_walker(Node *node, void *context)
#define CCDN_CASETESTEXPR_OK
static List * simplify_or_arguments(List *args, eval_const_expressions_context *context, bool *haveNull, bool *forceTrue)
static bool is_strict_saop(ScalarArrayOpExpr *expr, bool falseOK)
bool contain_volatile_functions_not_nextval(Node *clause)
List * find_forced_null_vars(Node *node)
static bool contain_leaked_vars_checker(Oid func_id, void *context)
static bool rowtype_field_matches(Oid rowtypeid, int fieldnum, Oid expectedtype, int32 expectedtypmod, Oid expectedcollation)
Query * inline_function_in_from(PlannerInfo *root, RangeTblEntry *rte)
static bool contain_nonstrict_functions_walker(Node *node, void *context)
static List * add_function_defaults(List *args, int pronargs, HeapTuple func_tuple)
#define ece_all_arguments_const(node)
bool expression_has_grouping_conflict(Node *expr, grouping_eqop_callback get_eqop, void *context)
#define ece_evaluate_expr(node)
static bool max_parallel_hazard_checker(Oid func_id, void *context)
static bool max_parallel_hazard_test(char proparallel, max_parallel_hazard_context *context)
bool contain_agg_clause(Node *clause)
static bool contain_agg_clause_walker(Node *node, void *context)
static bool contain_nonstrict_functions_checker(Oid func_id, void *context)
int NumRelids(PlannerInfo *root, Node *clause)
bool contain_mutable_functions(Node *clause)
bool is_pseudo_constant_clause(Node *clause)
static bool max_parallel_hazard_walker(Node *node, max_parallel_hazard_context *context)
bool contain_window_function(Node *clause)
#define ece_generic_processing(node)
Node * estimate_expression_value(PlannerInfo *root, Node *node)
static Expr * evaluate_function(Oid funcid, Oid result_type, int32 result_typmod, Oid result_collid, Oid input_collid, List *args, bool funcvariadic, HeapTuple func_tuple, eval_const_expressions_context *context)
static Node * substitute_actual_parameters_mutator(Node *node, substitute_actual_parameters_context *context)
static bool contain_mutable_functions_checker(Oid func_id, void *context)
Var * find_forced_null_var(Node *node)
bool is_pseudo_constant_clause_relids(Node *clause, Relids relids)
static bool grouping_check_operand(Node *arg, Oid opno, Oid inputcollid, grouping_walker_ctx *ctx)
static bool ece_function_is_safe(Oid funcid, eval_const_expressions_context *context)
static bool contain_volatile_functions_checker(Oid func_id, void *context)
static List * simplify_and_arguments(List *args, eval_const_expressions_context *context, bool *haveNull, bool *forceFalse)
WindowFuncLists * find_window_functions(Node *clause, Index maxWinRef)
static Expr * simplify_function(Oid funcid, Oid result_type, int32 result_typmod, Oid result_collid, Oid input_collid, List **args_p, bool funcvariadic, bool process_args, bool allow_non_const, eval_const_expressions_context *context)
Node * eval_const_expressions(PlannerInfo *root, Node *node)
static void find_subquery_safe_quals(Node *jtnode, List **safe_quals)
bool contain_volatile_functions_after_planning(Expr *expr)
static Expr * inline_function(Oid funcid, Oid result_type, Oid result_collid, Oid input_collid, List *args, bool funcvariadic, HeapTuple func_tuple, eval_const_expressions_context *context)
static List * reorder_function_arguments(List *args, int pronargs, HeapTuple func_tuple)
static Node * simplify_aggref(Aggref *aggref, eval_const_expressions_context *context)
static Node * substitute_actual_parameters(Node *expr, int nargs, List *args, int *usecounts)
static bool contain_mutable_functions_walker(Node *node, void *context)
static Query * substitute_actual_parameters_in_from(Query *expr, int nargs, List *args)
bool contain_mutable_functions_after_planning(Expr *expr)
static bool contain_volatile_functions_walker(Node *node, void *context)
bool contain_leaked_vars(Node *clause)
List * find_nonnullable_vars(Node *clause)
bool query_outputs_are_not_nullable(Query *query)
bool expr_is_nonnullable(PlannerInfo *root, Expr *expr, NotNullSource source)
static Relids find_nonnullable_rels_walker(Node *node, bool top_level)
void convert_saop_to_hashed_saop(Node *node)
static void sql_inline_error_callback(void *arg)
static bool contain_volatile_functions_not_nextval_walker(Node *node, void *context)
static bool contain_leaked_vars_walker(Node *node, void *context)
static bool grouping_check_operands(Oid opno, Oid inputcollid, List *args, grouping_walker_ctx *ctx)
static bool contain_non_const_walker(Node *node, void *context)
static bool contain_context_dependent_node(Node *clause)
Relids find_nonnullable_rels(Node *clause)
static void recheck_cast_function_args(List *args, Oid result_type, Oid *proargtypes, int pronargs, HeapTuple func_tuple)
static bool find_window_functions_walker(Node *node, WindowFuncLists *lists)
List * expand_function_arguments(List *args, bool include_out_arguments, Oid result_type, HeapTuple func_tuple)
char max_parallel_hazard(Query *parse)
bool is_parallel_safe(PlannerInfo *root, Node *node)
bool contain_nonstrict_functions(Node *clause)
static bool contain_volatile_functions_not_nextval_checker(Oid func_id, void *context)
static List * find_nonnullable_vars_walker(Node *node, bool top_level)
static Node * substitute_actual_parameters_in_from_mutator(Node *node, substitute_actual_parameters_in_from_context *context)
static Query * inline_sql_function_in_from(PlannerInfo *root, RangeTblFunction *rtfunc, FuncExpr *fexpr, HeapTuple func_tuple, Form_pg_proc funcform, const char *src)
bool contain_subplans(Node *clause)
static Node * simplify_boolean_equality(Oid opno, List *args)
static bool contain_exec_param_walker(Node *node, List *param_ids)
Bitmapset * pull_paramids(Expr *expr)
void CommuteOpExpr(OpExpr *clause)
ScalarArrayOpExpr * make_SAOP_expr(Oid oper, Node *leftexpr, Oid coltype, Oid arraycollid, Oid inputcollid, List *exprs, bool haveNonConst)
bool var_is_nonnullable(PlannerInfo *root, Var *var, NotNullSource source)
static bool grouping_conflict_walker(Node *node, grouping_walker_ctx *ctx)
static Node * eval_const_expressions_mutator(Node *node, eval_const_expressions_context *context)
static bool pull_paramids_walker(Node *node, Bitmapset **context)
Expr * evaluate_expr(Expr *expr, Oid result_type, int32 result_typmod, Oid result_collation)
static bool convert_saop_to_hashed_saop_walker(Node *node, void *context)
static List * fetch_function_defaults(HeapTuple func_tuple)
bool contain_volatile_functions(Node *clause)
double expression_returns_set_rows(PlannerInfo *root, Node *clause)
static bool contain_context_dependent_node_walker(Node *node, int *flags)
bool contain_exec_param(Node *clause, List *param_ids)
#define MIN_ARRAY_SIZE_FOR_HASHED_SAOP
Oid(* grouping_eqop_callback)(Var *var, void *context)
void cost_qual_eval(QualCost *cost, List *quals, PlannerInfo *root)
double clamp_row_est(double nrows)
Datum datumCopy(Datum value, bool typByVal, int typLen)
ErrorContextCallback * error_context_stack
int internalerrquery(const char *query)
int internalerrposition(int cursorpos)
int errposition(int cursorpos)
ExprState * ExecInitExpr(Expr *node, PlanState *parent)
void FreeExecutorState(EState *estate)
EState * CreateExecutorState(void)
#define GetPerTupleExprContext(estate)
static Datum ExecEvalExprSwitchContext(ExprState *state, ExprContext *econtext, bool *isNull)
#define palloc_object(type)
#define palloc_array(type, count)
#define OidFunctionCall1(functionId, arg1)
#define PG_DETOAST_DATUM_COPY(datum)
#define FmgrHookIsNeeded(fn_oid)
TypeFuncClass get_expr_result_type(Node *expr, Oid *resultTypeId, TupleDesc *resultTupleDesc)
@ TYPEFUNC_COMPOSITE_DOMAIN
bool check_sql_fn_retval(List *queryTreeLists, Oid rettype, TupleDesc rettupdesc, char prokind, bool insertDroppedCols)
void sql_fn_parser_setup(struct ParseState *pstate, SQLFunctionParseInfoPtr pinfo)
SQLFunctionParseInfoPtr prepare_sql_fn_parse_info(HeapTuple procedureTuple, Node *call_expr, Oid inputCollation)
bool heap_attisnull(HeapTuple tup, int attnum, TupleDesc tupleDesc)
#define HeapTupleIsValid(tuple)
static void * GETSTRUCT(const HeapTupleData *tuple)
bool to_json_is_immutable(Oid typoid)
bool to_jsonb_is_immutable(Oid typoid)
bool jspIsMutable(JsonPath *path, List *varnames, List *varexprs)
static JsonPath * DatumGetJsonPathP(Datum d)
List * lappend(List *list, void *datum)
List * list_delete_first(List *list)
List * list_concat(List *list1, const List *list2)
List * list_concat_copy(const List *list1, const List *list2)
List * list_copy(const List *oldlist)
List * lappend_oid(List *list, Oid datum)
List * list_delete_last(List *list)
void list_free(List *list)
bool list_member_int(const List *list, int datum)
bool list_member_oid(const List *list, Oid datum)
List * list_delete_first_n(List *list, int n)
char func_parallel(Oid funcid)
RegProcedure get_func_support(Oid funcid)
void getTypeOutputInfo(Oid type, Oid *typOutput, bool *typIsVarlena)
void get_typlenbyvalalign(Oid typid, int16 *typlen, bool *typbyval, char *typalign)
void get_typlenbyval(Oid typid, int16 *typlen, bool *typbyval)
RegProcedure get_opcode(Oid opno)
void getTypeInputInfo(Oid type, Oid *typInput, Oid *typIOParam)
char func_volatile(Oid funcid)
bool equality_ops_are_compatible(Oid opno1, Oid opno2)
bool op_is_safe_index_member(Oid opno)
bool func_strict(Oid funcid)
bool get_op_hash_functions_ext(Oid opno, Oid inputtype, RegProcedure *lhs_procno, RegProcedure *rhs_procno)
bool get_func_leakproof(Oid funcid)
const struct SubscriptRoutines * getSubscriptingRoutines(Oid typid, Oid *typelemp)
bool get_collation_isdeterministic(Oid colloid)
Oid get_array_type(Oid typid)
Oid get_negator(Oid opno)
Oid get_commutator(Oid opno)
Expr * make_orclause(List *orclauses)
Var * makeVar(int varno, AttrNumber varattno, Oid vartype, int32 vartypmod, Oid varcollid, Index varlevelsup)
Const * makeNullConst(Oid consttype, int32 consttypmod, Oid constcollid)
Node * makeBoolConst(bool value, bool isnull)
Expr * make_andclause(List *andclauses)
Expr * make_notclause(Expr *notclause)
JsonValueExpr * makeJsonValueExpr(Expr *raw_expr, Expr *formatted_expr, JsonFormat *format)
Const * makeConst(Oid consttype, int32 consttypmod, Oid constcollid, int constlen, Datum constvalue, bool constisnull, bool constbyval)
void pfree(void *pointer)
void * palloc0(Size size)
MemoryContext CurrentMemoryContext
void MemoryContextDelete(MemoryContext context)
#define AllocSetContextCreate
#define ALLOCSET_DEFAULT_SIZES
List * mbms_add_members(List *a, const List *b)
List * mbms_add_member(List *a, int listidx, int bitidx)
bool mbms_is_member(int listidx, int bitidx, const List *a)
List * mbms_int_members(List *a, const List *b)
Oid exprType(const Node *expr)
Oid exprInputCollation(const Node *expr)
int32 exprTypmod(const Node *expr)
bool check_functions_in_node(Node *node, check_function_callback checker, void *context)
Oid exprCollation(const Node *expr)
Node * applyRelabelType(Node *arg, Oid rtype, int32 rtypmod, Oid rcollid, CoercionForm rformat, int rlocation, bool overwrite_ok)
void fix_opfuncids(Node *node)
void set_sa_opfuncid(ScalarArrayOpExpr *opexpr)
void set_opfuncid(OpExpr *opexpr)
#define expression_tree_mutator(n, m, c)
static bool is_andclause(const void *clause)
static bool is_orclause(const void *clause)
#define query_tree_walker(q, w, c, f)
static bool is_opclause(const void *clause)
#define expression_tree_walker(n, w, c)
#define query_tree_mutator(q, m, c, f)
#define IsA(nodeptr, _type_)
#define castNode(_type_, nodeptr)
@ NOTNULL_SOURCE_HASHTABLE
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
void(* ParserSetupHook)(ParseState *pstate, void *arg)
Oid enforce_generic_type_consistency(const Oid *actual_arg_types, Oid *declared_arg_types, int nargs, Oid rettype, bool allow_poly)
void make_fn_arguments(ParseState *pstate, List *fargs, Oid *actual_arg_types, Oid *declared_arg_types)
void free_parsestate(ParseState *pstate)
ParseState * make_parsestate(ParseState *parentParseState)
Operator oper(ParseState *pstate, List *opname, Oid ltypeId, Oid rtypeId, bool noError, int location)
Query * transformTopLevelStmt(ParseState *pstate, RawStmt *parseTree)
#define planner_rt_fetch(rti, root)
FormData_pg_attribute * Form_pg_attribute
bool has_subclass(Oid relationId)
#define lfirst_node(type, lc)
static int list_length(const List *l)
#define linitial_node(type, l)
#define foreach_ptr(type, var, lst)
#define forthree(cell1, list1, cell2, list2, cell3, list3)
static void * list_nth(const List *list, int n)
#define list_make3(x1, x2, x3)
#define foreach_node(type, var, lst)
#define forfour(cell1, list1, cell2, list2, cell3, list3, cell4, list4)
#define list_make2(x1, x2)
END_CATALOG_STRUCT typedef FormData_pg_proc * Form_pg_proc
static rewind_source * source
double get_function_rows(PlannerInfo *root, Oid funcid, Node *node)
Bitmapset * find_relation_notnullatts(PlannerInfo *root, Oid relid)
Expr * expression_planner(Expr *expr)
List * pg_analyze_and_rewrite_withcb(RawStmt *parsetree, const char *query_string, ParserSetupHook parserSetup, void *parserSetupArg, QueryEnvironment *queryEnv)
List * pg_parse_query(const char *query_string)
List * pg_rewrite_query(Query *query)
static bool DatumGetBool(Datum X)
static Datum BoolGetDatum(bool X)
static Datum ObjectIdGetDatum(Oid X)
static Pointer DatumGetPointer(Datum X)
static Datum Int32GetDatum(int32 X)
#define PointerGetDatum(X)
Node * negate_clause(Node *node)
@ JSCTOR_JSON_ARRAY_QUERY
void * stringToNode(const char *str)
#define RelationGetDescr(relation)
RelOptInfo * find_base_rel(PlannerInfo *root, int relid)
void AcquireRewriteLocks(Query *parsetree, bool forExecute, bool forUpdatePushedDown)
bool contain_windowfuncs(Node *node)
void IncrementVarSublevelsUp(Node *node, int delta_sublevels_up, int min_sublevels_up)
void record_plan_type_dependency(PlannerInfo *root, Oid typid)
void record_plan_function_dependency(PlannerInfo *root, Oid funcid)
void check_stack_depth(void)
BoolTestType booltesttype
MemoryContext es_query_cxt
struct ErrorContextCallback * previous
NullTestType nulltesttype
ParamExternData params[FLEXIBLE_ARRAY_MEMBER]
ParamFetchHook paramFetch
const char * p_sourcetext
VolatileFunctionStatus has_volatile_expr
Bitmapset * notnullattnums
VarReturningType varreturningtype
ParamListInfo boundParams
grouping_eqop_callback get_eqop
#define FirstLowInvalidHeapAttributeNumber
void ReleaseSysCache(HeapTuple tuple)
Datum SysCacheGetAttrNotNull(SysCacheIdentifier cacheId, HeapTuple tup, AttrNumber attributeNumber)
HeapTuple SearchSysCache1(SysCacheIdentifier cacheId, Datum key1)
Datum SysCacheGetAttr(SysCacheIdentifier cacheId, HeapTuple tup, AttrNumber attributeNumber, bool *isNull)
void table_close(Relation relation, LOCKMODE lockmode)
Relation table_open(Oid relationId, LOCKMODE lockmode)
TupleDesc BuildDescFromLists(const List *names, const List *types, const List *typmods, const List *collations)
#define ReleaseTupleDesc(tupdesc)
#define ATTNULLABLE_VALID
static FormData_pg_attribute * TupleDescAttr(TupleDesc tupdesc, int i)
static CompactAttribute * TupleDescCompactAttr(TupleDesc tupdesc, int i)
bool DomainHasConstraints(Oid type_id, bool *has_volatile)
TupleDesc lookup_rowtype_tupdesc_domain(Oid type_id, int32 typmod, bool noError)
TypeCacheEntry * lookup_type_cache(Oid type_id, int flags)
#define TYPECACHE_CMP_PROC
Node * flatten_group_exprs(PlannerInfo *root, Query *query, Node *node)
bool contain_var_clause(Node *node)
Relids pull_varnos(PlannerInfo *root, Node *node)
Node * flatten_join_alias_vars(PlannerInfo *root, Query *query, Node *node)