57#include "utils/fmgroids.h"
170 int nargs,
List *args);
248 lists->numWindowFuncs = 0;
249 lists->maxWinRef = maxWinRef;
266 elog(
ERROR,
"WindowFunc contains out-of-range winref %u",
271 lists->numWindowFuncs++;
310 if (expr->funcretset)
442 if (
cnst->constisnull)
779 root->glob->paramExecTypes ==
NIL)
793 foreach(l,
proot->init_plans)
1201#define CCDN_CASETESTEXPR_OK 0x0001
1507 foreach(l, (
List *) node)
1566 foreach(l, expr->
args)
1691 if (
phv->phlevelsup == 0 &&
1760 foreach(l, (
List *) node)
1824 foreach(l, expr->
args)
1959 foreach(l, (
List *) node)
2010 if (var &&
IsA(var,
Var) &&
2024 if (var &&
IsA(var,
Var) &&
2081 MemSet(&subroot, 0,
sizeof(subroot));
2082 subroot.
parse = query;
2123 if (query->hasGroupRTE)
2213 switch (
j->jointype)
2247 elog(
ERROR,
"unrecognized join type: %d",
2253 elog(
ERROR,
"unrecognized node type: %d",
2303 if (arrayexpr->elements !=
NIL && !arrayexpr->multidims)
2400 elog(
ERROR,
"cannot commute non-binary-operator clause");
2405 elog(
ERROR,
"could not find commutator for operator %u",
2448 if (attr->attisdropped ||
2515#define MIN_ARRAY_SIZE_FOR_HASHED_SAOP 9
2663#define ece_generic_processing(node) \
2664 expression_tree_mutator((Node *) (node), eval_const_expressions_mutator, \
2672#define ece_all_arguments_const(node) \
2673 (!expression_tree_walker((Node *) (node), contain_non_const_walker, NULL))
2676#define ece_evaluate_expr(node) \
2677 ((Node *) evaluate_expr((Expr *) (node), \
2678 exprType((Node *) (node)), \
2679 exprTypmod((Node *) (node)), \
2680 exprCollation((Node *) (node))))
2747 &typLen, &typByVal);
2748 if (
prm->isnull || typByVal)
2760 return (
Node *) con;
2789 elog(
ERROR,
"cache lookup failed for function %u", funcid);
2792 false, expr->wintype,
2803 aggfilter = (
Expr *)
2810 newexpr->wintype = expr->wintype;
2811 newexpr->wincollid = expr->wincollid;
2812 newexpr->inputcollid = expr->inputcollid;
2814 newexpr->aggfilter = aggfilter;
2815 newexpr->runCondition = expr->runCondition;
2817 newexpr->winstar = expr->winstar;
2818 newexpr->winagg = expr->winagg;
2839 expr->funcresulttype,
2849 return (
Node *) simple;
2859 newexpr->funcresulttype = expr->funcresulttype;
2860 newexpr->funcretset = expr->funcretset;
2861 newexpr->funcvariadic = expr->funcvariadic;
2862 newexpr->funcformat = expr->funcformat;
2863 newexpr->funccollid = expr->funccollid;
2864 newexpr->inputcollid = expr->inputcollid;
2892 expr->opresulttype, -1,
2901 return (
Node *) simple;
2914 return (
Node *) simple;
2924 newexpr->opfuncid = expr->opfuncid;
2925 newexpr->opresulttype = expr->opresulttype;
2926 newexpr->opretset = expr->opretset;
2927 newexpr->opcollid = expr->opcollid;
2928 newexpr->inputcollid = expr->inputcollid;
3011 expr->opresulttype, -1,
3063 eqexpr->opfuncid = expr->opfuncid;
3065 eqexpr->opretset = expr->opretset;
3066 eqexpr->opcollid = expr->opcollid;
3067 eqexpr->inputcollid = expr->inputcollid;
3093 nt->argisrow =
false;
3106 newexpr->opfuncid = expr->opfuncid;
3107 newexpr->opresulttype = expr->opresulttype;
3108 newexpr->opretset = expr->opretset;
3109 newexpr->opcollid = expr->opcollid;
3110 newexpr->inputcollid = expr->inputcollid;
3143 return (
Node *) expr;
3162 return (
Node *) saop;
3251 Node *formatted_expr = (
Node *)
jve->formatted_expr;
3261 if (formatted_expr &&
IsA(formatted_expr,
Const))
3262 return formatted_expr;
3267 (
Expr *) formatted_expr,
3382 return (
Node *) simple;
3393 newexpr->resultcollid = expr->resultcollid;
3394 newexpr->coerceformat = expr->coerceformat;
3754 ((
Var *)
arg)->varlevelsup == 0)
3769 ((
Var *)
arg)->varlevelsup);
3771 newvar->varreturningtype = ((
Var *)
arg)->varreturningtype;
3773 newvar->varnullingrels = ((
Var *)
arg)->varnullingrels;
3837 foreach(l, rarg->
args)
3849 if (
carg->constisnull ?
3897 switch (
ntest->nulltesttype)
3906 elog(
ERROR,
"unrecognized nulltesttype: %d",
3907 (
int)
ntest->nulltesttype);
3920 switch (
ntest->nulltesttype)
3929 elog(
ERROR,
"unrecognized nulltesttype: %d",
3930 (
int)
ntest->nulltesttype);
3968 switch (
btest->booltesttype)
3993 elog(
ERROR,
"unrecognized booltesttype: %d",
3994 (
int)
btest->booltesttype);
4009 switch (
btest->booltesttype)
4026 elog(
ERROR,
"unrecognized booltesttype: %d",
4027 (
int)
btest->booltesttype);
4111 newcre->convertformat =
cre->convertformat;
4517 elog(
ERROR,
"cache lookup failed for function %u", funcid);
4556 fexpr.funcid = funcid;
4557 fexpr.funcresulttype = result_type;
4564 fexpr.location = -1;
4614 req.aggref = aggref;
4629 return (
Node *) aggref;
4757 elog(
ERROR,
"unrecognized NotNullSource: %d",
4799 return !((
Const *) expr)->constisnull;
4961 elog(
ERROR,
"proallargtypes is not a 1-D Oid array or it contains nulls");
5018 elog(
ERROR,
"too many function arguments");
5052 foreach(
lc, defaults)
5090 elog(
ERROR,
"not enough default arguments");
5144 elog(
ERROR,
"too many function arguments");
5158 if (rettype != result_type)
5159 elog(
ERROR,
"function's resolved result type changed during planning");
5258 newexpr->funcresulttype = result_type;
5369 fexpr->funcid = funcid;
5370 fexpr->funcresulttype = result_type;
5371 fexpr->funcretset =
false;
5377 fexpr->location = -1;
5388 callback_arg.
prosrc = src;
5493 result_type, rettupdesc,
5561 if (usecounts[
i] == 0)
5567 else if (usecounts[
i] != 1)
5664 context.
nargs = nargs;
5665 context.
args = args;
5840 if (
rte->funcordinality)
5899 "inline_function_in_from",
5917 req.rtfunc = rtfunc;
5933 callback_arg.
prosrc = src;
5992 root->glob->dependsOnRole =
true;
6039 if (!
fexpr->funcretset)
6099 fexpr->inputcollid);
6124 if (rtfunc->funccolnames !=
NIL)
6128 rtfunc->funccoltypes,
6129 rtfunc->funccoltypmods,
6130 rtfunc->funccolcollations);
6156 fexpr->funcresulttype, rettupdesc,
6184 context.
nargs = nargs;
6185 context.
args = args;
6209 context->sublevels_up--;
6318 elems[
i] =
value->constvalue;
6319 nulls[
i++] =
value->constisnull;
6323 coltype, typlen, typbyval,
typalign);
6340 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)
#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 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 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 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
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 func_strict(Oid funcid)
bool get_func_leakproof(Oid funcid)
const struct SubscriptRoutines * getSubscriptingRoutines(Oid typid, Oid *typelemp)
bool get_op_hash_functions(Oid opno, RegProcedure *lhs_procno, RegProcedure *rhs_procno)
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)
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 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
#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)