100#ifdef DEBUG_NODE_TESTS_ENABLED
118 const Oid *paramTypes,
int numParams,
140 (*post_parse_analyze_hook) (pstate, query,
jstate);
158 Oid **paramTypes,
int *numParams,
182 (*post_parse_analyze_hook) (pstate, query,
jstate);
200 void *parserSetupArg,
211 (*parserSetup) (pstate, parserSetupArg);
219 (*post_parse_analyze_hook) (pstate, query,
jstate);
296 if (
stmt->intoClause)
303 ctas->is_select_into =
true;
328#ifdef DEBUG_NODE_TESTS_ENABLED
438 result->canSetTag =
true;
574 if (
stmt->withClause)
576 qry->hasRecursive =
stmt->withClause->recursive;
592 nsitem->p_lateral_only =
true;
593 nsitem->p_lateral_ok =
false;
604 nsitem->p_lateral_only =
false;
605 nsitem->p_lateral_ok =
true;
662 if (
stmt->withClause)
664 qry->hasRecursive =
stmt->withClause->recursive;
669 qry->override =
stmt->override;
740 if (selectStmt ==
NULL)
789 elog(
ERROR,
"unexpected non-SELECT command in INSERT ... SELECT");
857 bool lateral =
false;
886 errmsg(
"VALUES lists must all be the same length"),
954 NULL, lateral,
true);
1028 if (
stmt->onConflictClause ||
stmt->returningClause)
1036 if (
stmt->onConflictClause &&
1038 !
stmt->returningClause)
1041 errmsg(
"ON CONFLICT DO SELECT requires a RETURNING clause"),
1045 if (
stmt->onConflictClause)
1047 stmt->onConflictClause);
1050 if (
stmt->returningClause)
1097 errmsg(
"INSERT has more expressions than target columns"),
1115 errmsg(
"INSERT has more target columns than expressions"),
1119 errhint(
"The insertion source is a row expression containing the same number of columns expected by the INSERT. Did you accidentally use extra parentheses?") : 0),
1177 result =
lappend(result, expr);
1197 int exclRelIndex = 0;
1308 if (attr->attisdropped)
1319 var =
makeVar(exclRelIndex, attno + 1,
1320 attr->atttypid, attr->atttypmod,
1420 if (
stmt->withClause)
1422 qry->hasRecursive =
stmt->withClause->recursive;
1428 if (
stmt->intoClause)
1431 errmsg(
"SELECT ... INTO is not allowed here"),
1490 if (
stmt->distinctClause ==
NIL)
1493 qry->hasDistinctOn =
false;
1502 qry->hasDistinctOn =
false;
1508 stmt->distinctClause,
1511 qry->hasDistinctOn =
true;
1541 foreach(l,
stmt->lockingClause)
1573 bool lateral =
false;
1593 if (
stmt->withClause)
1595 qry->hasRecursive =
stmt->withClause->recursive;
1607 foreach(
lc,
stmt->valuesLists)
1634 errmsg(
"VALUES lists must all be the same length"),
1678 foreach(
lc, colexprs[
i])
1725 NULL, lateral,
true);
1752 if (
stmt->lockingClause)
1757 errmsg(
"%s cannot be applied to VALUES",
1793 List *lockingClause;
1828 errmsg(
"SELECT ... INTO is not allowed here"),
1837 sortClause =
stmt->sortClause;
1838 limitOffset =
stmt->limitOffset;
1839 limitCount =
stmt->limitCount;
1840 lockingClause =
stmt->lockingClause;
1841 withClause =
stmt->withClause;
1855 errmsg(
"%s is not allowed with UNION/INTERSECT/EXCEPT",
1857 linitial(lockingClause))->strength))));
1862 qry->hasRecursive = withClause->
recursive;
1995 errmsg(
"invalid UNION/INTERSECT/EXCEPT ORDER BY clause"),
1996 errdetail(
"Only result column names can be used, not expressions or functions."),
1997 errhint(
"Add the expression/function to every SELECT, or move the UNION into a FROM clause."),
2018 foreach(l, lockingClause)
2050 &sortop, &eqop,
NULL,
2063 grpcl->tleSortGroupRef = 0;
2065 grpcl->sortop = sortop;
2066 grpcl->reverse_sort =
false;
2067 grpcl->nulls_first =
false;
2068 grpcl->hashable = hashable;
2101 if (
stmt->intoClause)
2104 errmsg(
"INTO is only allowed on first SELECT of UNION/INTERSECT/EXCEPT"),
2109 if (
stmt->lockingClause)
2114 errmsg(
"%s is not allowed with UNION/INTERSECT/EXCEPT",
2132 if (
stmt->sortClause ||
stmt->limitOffset ||
stmt->limitCount ||
2133 stmt->lockingClause ||
stmt->withClause)
2162 NULL,
false,
false);
2175 errmsg(
"UNION/INTERSECT/EXCEPT member statement cannot refer to other relations of same query level"),
2219 const char *context;
2260 errmsg(
"each %s query must have the same number of columns",
2268 op->colTypmods =
NIL;
2269 op->colCollations =
NIL;
2270 op->groupClauses =
NIL;
2379 op->groupClauses =
lappend(op->groupClauses,
2475 qry->isReturn =
true;
2510 if (
stmt->withClause)
2512 qry->hasRecursive =
stmt->withClause->recursive;
2518 stmt->relation->inh,
2525 nsitem->p_lateral_ok =
false;
2534 nsitem->p_lateral_only =
false;
2535 nsitem->p_lateral_ok =
true;
2603 elog(
ERROR,
"UPDATE target count mismatch --- internal error");
2611 errmsg(
"column \"%s\" of relation \"%s\" does not exist",
2616 errhint(
"SET target columns cannot be qualified with the relation name.") : 0,
2631 elog(
ERROR,
"UPDATE target count mismatch --- internal error");
2660 nscolumns[
i].p_varreturningtype = returning_type;
2669 nsitem->p_returning_type = returning_type;
2687 if (returningClause ==
NULL)
2699 if (qry->returningOldAlias !=
NULL)
2703 errmsg(
"%s cannot be specified multiple times",
"OLD"),
2705 qry->returningOldAlias =
option->value;
2709 if (qry->returningNewAlias !=
NULL)
2713 errmsg(
"%s cannot be specified multiple times",
"NEW"),
2715 qry->returningNewAlias =
option->value;
2725 errmsg(
"table name \"%s\" specified more than once",
2738 if (qry->returningOldAlias ==
NULL &&
2741 qry->returningOldAlias =
"old";
2744 if (qry->returningNewAlias ==
NULL &&
2747 qry->returningNewAlias =
"new";
2761 returningClause->
exprs,
2773 errmsg(
"RETURNING must have at least one column"),
2806 List *indirection =
stmt->indirection;
2807 int nnames =
stmt->nnames;
2823 while (--nnames > 0 && indirection !=
NIL)
2828 elog(
ERROR,
"invalid name count in PLAssignStmt");
2848 passthru.indirection = indirection;
2898 "assignment source returned %d columns",
2928 else if (targettype != type_id &&
2950 targettype, targettypmod,
2958 errmsg(
"variable \"%s\" is of type %s"
2959 " but expression is of type %s",
2963 errhint(
"You will need to rewrite or cast the expression."),
2994 errmsg(
"cannot specify both %s and %s",
2995 "SCROLL",
"NO SCROLL")));
3002 errmsg(
"cannot specify both %s and %s",
3003 "ASENSITIVE",
"INSENSITIVE")));
3012 elog(
ERROR,
"unexpected non-SELECT command in DECLARE CURSOR");
3019 if (query->hasModifyingCTE)
3022 errmsg(
"DECLARE CURSOR must not contain data-modifying statements in WITH")));
3030 errmsg(
"DECLARE CURSOR WITH HOLD ... %s is not supported",
3033 errdetail(
"Holdable cursors must be READ ONLY.")));
3041 errmsg(
"DECLARE SCROLL CURSOR ... %s is not supported",
3044 errdetail(
"Scrollable cursors must be READ ONLY.")));
3052 errmsg(
"DECLARE INSENSITIVE CURSOR ... %s is not valid",
3055 errdetail(
"Insensitive cursors must be READ ONLY.")));
3093 foreach(
lc,
stmt->options)
3148 if (query->hasModifyingCTE)
3151 errmsg(
"materialized views must not use data-modifying statements in WITH")));
3161 errmsg(
"materialized views must not use temporary objects"),
3162 errdetail(
"This view depends on temporary %s.",
3173 errmsg(
"materialized views may not be defined using bound parameters")));
3185 errmsg(
"materialized views cannot be unlogged")));
3225 foreach(
lc,
stmt->funccall->args)
3233 stmt->funccall->funcname,
3238 stmt->funccall->location);
3246 elog(
ERROR,
"cache lookup failed for function %u",
fexpr->funcid);
3256 fexpr->funcresulttype,
3281 elog(
ERROR,
"proargmodes is not a 1-D char array of length %d or it contains nulls",
3298 outargs =
lappend(outargs, n);
3306 elog(
ERROR,
"invalid argmode %c for procedure",
3316 stmt->outargs = outargs;
3341 return "FOR KEY SHARE";
3345 return "FOR NO KEY UPDATE";
3347 return "FOR UPDATE";
3367 errmsg(
"%s is not allowed with UNION/INTERSECT/EXCEPT",
3374 errmsg(
"%s is not allowed with DISTINCT clause",
3381 errmsg(
"%s is not allowed with GROUP BY clause",
3388 errmsg(
"%s is not allowed with HAVING clause",
3395 errmsg(
"%s is not allowed with aggregate functions",
3397 if (qry->hasWindowFuncs)
3402 errmsg(
"%s is not allowed with window functions",
3404 if (qry->hasTargetSRFs)
3409 errmsg(
"%s is not allowed with set-returning functions in the target list",
3425 List *lockedRels =
lc->lockedRels;
3439 if (lockedRels ==
NIL)
3457 switch (
rte->rtekind)
3498 foreach(l, lockedRels)
3508 errmsg(
"%s must specify unqualified relation names",
3535 if (
rte->join_using_alias ==
NULL)
3546 switch (
rte->rtekind)
3562 lc->waitPolicy, pushedDown);
3572 errmsg(
"%s cannot be applied to a join",
3581 errmsg(
"%s cannot be applied to a function",
3590 errmsg(
"%s cannot be applied to a table function",
3599 errmsg(
"%s cannot be applied to VALUES",
3608 errmsg(
"%s cannot be applied to a WITH query",
3617 errmsg(
"%s cannot be applied to a named tuplestore",
3625 elog(
ERROR,
"unrecognized RTE type: %d",
3626 (
int)
rte->rtekind);
3637 errmsg(
"relation \"%s\" in %s clause not found in FROM clause",
3659 qry->hasForUpdate =
true;
3698#ifdef DEBUG_NODE_TESTS_ENABLED
void(* post_parse_analyze_hook_type)(ParseState *pstate, Query *query, JumbleState *jstate)
#define DatumGetArrayTypeP(X)
#define InvalidAttrNumber
void pgstat_report_query_id(int64 query_id, bool force)
Bitmapset * bms_add_member(Bitmapset *a, int x)
#define Assert(condition)
List * expand_function_arguments(List *args, bool include_out_arguments, Oid result_type, HeapTuple func_tuple)
bool defGetBoolean(DefElem *def)
bool query_uses_temp_object(Query *query, ObjectAddress *temp_object)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
int errhint(const char *fmt,...) pg_attribute_printf(1
int errdetail(const char *fmt,...) pg_attribute_printf(1
int int int errmsg_plural(const char *fmt_singular, const char *fmt_plural, unsigned long n,...) pg_attribute_printf(1
#define ereport(elevel,...)
#define palloc_object(type)
#define palloc_array(type, count)
#define HeapTupleIsValid(tuple)
List * lappend(List *list, void *datum)
List * list_delete_first(List *list)
List * list_copy(const List *oldlist)
List * lappend_int(List *list, int datum)
List * lappend_oid(List *list, Oid datum)
List * list_delete_last(List *list)
void list_free(List *list)
List * list_truncate(List *list, int new_size)
Alias * makeAlias(const char *aliasname, List *colnames)
Var * makeVarFromTargetEntry(int varno, TargetEntry *tle)
FromExpr * makeFromExpr(List *fromlist, Node *quals)
Var * makeVar(int varno, AttrNumber varattno, Oid vartype, int32 vartypmod, Oid varcollid, Index varlevelsup)
Const * makeNullConst(Oid consttype, int32 consttypmod, Oid constcollid)
TargetEntry * makeTargetEntry(Expr *expr, AttrNumber resno, char *resname, bool resjunk)
char * pstrdup(const char *in)
void * palloc0(Size size)
Oid exprType(const Node *expr)
int32 exprTypmod(const Node *expr)
Oid exprCollation(const Node *expr)
int exprLocation(const Node *expr)
#define raw_expression_tree_walker(n, w, c)
#define IsA(nodeptr, _type_)
#define castNode(_type_, nodeptr)
char * getObjectDescription(const ObjectAddress *object, bool missing_ok)
void(* ParserSetupHook)(ParseState *pstate, void *arg)
void parseCheckAggregates(ParseState *pstate, Query *qry)
Node * transformWhereClause(ParseState *pstate, Node *clause, ParseExprKind exprKind, const char *constructName)
List * transformGroupClause(ParseState *pstate, List *grouplist, bool groupByAll, List **groupingSets, List **targetlist, List *sortClause, ParseExprKind exprKind, bool useSQL99)
List * transformSortClause(ParseState *pstate, List *orderlist, List **targetlist, ParseExprKind exprKind, bool useSQL99)
List * transformDistinctOnClause(ParseState *pstate, List *distinctlist, List **targetlist, List *sortClause)
List * transformWindowDefinitions(ParseState *pstate, List *windowdefs, List **targetlist)
void transformFromClause(ParseState *pstate, List *frmList)
List * transformDistinctClause(ParseState *pstate, List **targetlist, List *sortClause, bool is_agg)
Node * transformLimitClause(ParseState *pstate, Node *clause, ParseExprKind exprKind, const char *constructName, LimitOption limitOption)
void transformOnConflictArbiter(ParseState *pstate, OnConflictClause *onConflictClause, List **arbiterExpr, Node **arbiterWhere, Oid *constraint)
int setTargetTable(ParseState *pstate, RangeVar *relation, bool inh, bool alsoSource, AclMode requiredPerms)
Node * coerce_to_common_type(ParseState *pstate, Node *node, Oid targetTypeId, const char *context)
int32 select_common_typmod(ParseState *pstate, List *exprs, Oid common_type)
Oid select_common_type(ParseState *pstate, List *exprs, const char *context, Node **which_expr)
Node * coerce_to_target_type(ParseState *pstate, Node *expr, Oid exprtype, Oid targettype, int32 targettypmod, CoercionContext ccontext, CoercionForm cformat, int location)
void assign_list_collations(ParseState *pstate, List *exprs)
Oid select_common_collation(ParseState *pstate, List *exprs, bool none_ok)
void assign_query_collations(ParseState *pstate, Query *query)
void assign_expr_collations(ParseState *pstate, Node *expr)
void analyzeCTETargetList(ParseState *pstate, CommonTableExpr *cte, List *tlist)
List * transformWithClause(ParseState *pstate, WithClause *withClause)
Node * transformExpr(ParseState *pstate, Node *expr, ParseExprKind exprKind)
Node * ParseFuncOrColumn(ParseState *pstate, List *funcname, List *fargs, Node *last_srf, FuncCall *fn, bool proc_call, int location)
Query * transformMergeStmt(ParseState *pstate, MergeStmt *stmt)
void cancel_parser_errposition_callback(ParseCallbackState *pcbstate)
void free_parsestate(ParseState *pstate)
int parser_errposition(ParseState *pstate, int location)
void setup_parser_errposition_callback(ParseCallbackState *pcbstate, ParseState *pstate, int location)
ParseState * make_parsestate(ParseState *parentParseState)
@ EXPR_KIND_INSERT_TARGET
@ EXPR_KIND_UPDATE_TARGET
@ EXPR_KIND_SELECT_TARGET
@ EXPR_KIND_CALL_ARGUMENT
@ EXPR_KIND_UPDATE_SOURCE
@ EXPR_KIND_VALUES_SINGLE
void get_sort_group_operators(Oid argtype, bool needLT, bool needEQ, bool needGT, Oid *ltOpr, Oid *eqOpr, Oid *gtOpr, bool *isHashable)
void check_variable_parameters(ParseState *pstate, Query *query)
bool query_contains_extern_params(Query *query)
void setup_parse_variable_parameters(ParseState *pstate, Oid **paramTypes, int *numParams)
void setup_parse_fixed_parameters(ParseState *pstate, const Oid *paramTypes, int numParams)
RTEPermissionInfo * getRTEPermissionInfo(List *rteperminfos, RangeTblEntry *rte)
RowMarkClause * get_parse_rowmark(Query *qry, Index rtindex)
TargetEntry * get_tle_by_resno(List *tlist, AttrNumber resno)
List * expandNSItemVars(ParseState *pstate, ParseNamespaceItem *nsitem, int sublevels_up, int location, List **colnames)
void addNSItemToQuery(ParseState *pstate, ParseNamespaceItem *nsitem, bool addToJoinList, bool addToRelNameSpace, bool addToVarNameSpace)
ParseNamespaceItem * addRangeTableEntryForRelation(ParseState *pstate, Relation rel, LOCKMODE lockmode, Alias *alias, bool inh, bool inFromCl)
ParseNamespaceItem * addRangeTableEntryForSubquery(ParseState *pstate, Query *subquery, Alias *alias, bool lateral, bool inFromCl)
ParseNamespaceItem * addRangeTableEntryForJoin(ParseState *pstate, List *colnames, ParseNamespaceColumn *nscolumns, JoinType jointype, int nummergedcols, List *aliasvars, List *leftcols, List *rightcols, Alias *join_using_alias, Alias *alias, bool inFromCl)
List * expandNSItemAttrs(ParseState *pstate, ParseNamespaceItem *nsitem, int sublevels_up, bool require_col_privs, int location)
ParseNamespaceItem * refnameNamespaceItem(ParseState *pstate, const char *schemaname, const char *refname, int location, int *sublevels_up)
RangeTblEntry * GetRTEByRangeTablePosn(ParseState *pstate, int varno, int sublevels_up)
int attnameAttNum(Relation rd, const char *attname, bool sysColOK)
ParseNamespaceItem * addRangeTableEntryForValues(ParseState *pstate, List *exprs, List *coltypes, List *coltypmods, List *colcollations, Alias *alias, bool lateral, bool inFromCl)
Expr * transformAssignedExpr(ParseState *pstate, Expr *expr, ParseExprKind exprKind, const char *colname, int attrno, List *indirection, int location)
List * transformExpressionList(ParseState *pstate, List *exprlist, ParseExprKind exprKind, bool allowDefault)
Node * transformAssignmentIndirection(ParseState *pstate, Node *basenode, const char *targetName, bool targetIsSubscripting, Oid targetTypeId, int32 targetTypMod, Oid targetCollation, List *indirection, ListCell *indirection_cell, Node *rhs, CoercionContext ccontext, int location)
void updateTargetListEntry(ParseState *pstate, TargetEntry *tle, char *colname, int attrno, List *indirection, int location)
List * transformTargetList(ParseState *pstate, List *targetlist, ParseExprKind exprKind)
void resolveTargetListUnknowns(ParseState *pstate, List *targetlist)
void markTargetListOrigins(ParseState *pstate, List *targetlist)
List * checkInsertTargets(ParseState *pstate, List *cols, List **attrnos)
#define ISCOMPLEX(typeid)
#define CURSOR_OPT_INSENSITIVE
#define CURSOR_OPT_SCROLL
#define ACL_SELECT_FOR_UPDATE
#define CURSOR_OPT_ASENSITIVE
#define CURSOR_OPT_NO_SCROLL
static OnConflictExpr * transformOnConflictClause(ParseState *pstate, OnConflictClause *onConflictClause)
static Query * transformOptionalSelectInto(ParseState *pstate, Node *parseTree)
static void transformLockingClause(ParseState *pstate, Query *qry, LockingClause *lc, bool pushedDown)
static Query * transformDeleteStmt(ParseState *pstate, DeleteStmt *stmt)
void CheckSelectLocking(Query *qry, LockClauseStrength strength)
SortGroupClause * makeSortGroupClauseForSetOp(Oid rescoltype, bool require_hash)
static Node * transformSetOperationTree(ParseState *pstate, SelectStmt *stmt, bool isTopLevel, List **targetlist)
Query * parse_analyze_withcb(RawStmt *parseTree, const char *sourceText, ParserSetupHook parserSetup, void *parserSetupArg, QueryEnvironment *queryEnv)
bool analyze_requires_snapshot(RawStmt *parseTree)
List * transformInsertRow(ParseState *pstate, List *exprlist, List *stmtcols, List *icolumns, List *attrnos, bool strip_indirection)
void applyLockingClause(Query *qry, Index rtindex, LockClauseStrength strength, LockWaitPolicy waitPolicy, bool pushedDown)
static void determineRecursiveColTypes(ParseState *pstate, Node *larg, List *nrtargetlist)
static Query * transformReturnStmt(ParseState *pstate, ReturnStmt *stmt)
static void addNSItemForReturning(ParseState *pstate, const char *aliasname, VarReturningType returning_type)
void transformReturningClause(ParseState *pstate, Query *qry, ReturningClause *returningClause, ParseExprKind exprKind)
static Query * transformPLAssignStmt(ParseState *pstate, PLAssignStmt *stmt)
static Query * transformCreateTableAsStmt(ParseState *pstate, CreateTableAsStmt *stmt)
post_parse_analyze_hook_type post_parse_analyze_hook
static Query * transformCallStmt(ParseState *pstate, CallStmt *stmt)
List * transformUpdateTargetList(ParseState *pstate, List *origTlist)
static Query * transformSetOperationStmt(ParseState *pstate, SelectStmt *stmt)
bool query_requires_rewrite_plan(Query *query)
static Query * transformSelectStmt(ParseState *pstate, SelectStmt *stmt, SelectStmtPassthrough *passthru)
Query * transformTopLevelStmt(ParseState *pstate, RawStmt *parseTree)
const char * LCS_asString(LockClauseStrength strength)
Query * parse_analyze_fixedparams(RawStmt *parseTree, const char *sourceText, const Oid *paramTypes, int numParams, QueryEnvironment *queryEnv)
static Query * transformUpdateStmt(ParseState *pstate, UpdateStmt *stmt)
Query * parse_sub_analyze(Node *parseTree, ParseState *parentParseState, CommonTableExpr *parentCTE, bool locked_from_parent, bool resolve_unknowns)
static Query * transformExplainStmt(ParseState *pstate, ExplainStmt *stmt)
List * BuildOnConflictExcludedTargetlist(Relation targetrel, Index exclRelIndex)
static List * transformPLAssignStmtTarget(ParseState *pstate, List *tlist, SelectStmtPassthrough *passthru)
static int count_rowexpr_columns(ParseState *pstate, Node *expr)
Query * parse_analyze_varparams(RawStmt *parseTree, const char *sourceText, Oid **paramTypes, int *numParams, QueryEnvironment *queryEnv)
bool stmt_requires_parse_analysis(RawStmt *parseTree)
static Query * transformDeclareCursorStmt(ParseState *pstate, DeclareCursorStmt *stmt)
static Query * transformInsertStmt(ParseState *pstate, InsertStmt *stmt)
static Query * transformValuesClause(ParseState *pstate, SelectStmt *stmt)
Query * transformStmt(ParseState *pstate, Node *parseTree)
#define rt_fetch(rangetable_index, rangetable)
FormData_pg_attribute * Form_pg_attribute
#define lfirst_node(type, lc)
static int list_length(const List *l)
#define linitial_node(type, l)
#define forboth(cell1, list1, cell2, list2)
#define forthree(cell1, list1, cell2, list2, cell3, list3)
static void * list_nth(const List *list, int n)
#define foreach_node(type, var, lst)
#define forfour(cell1, list1, cell2, list2, cell3, list3, cell4, list4)
static ListCell * list_head(const List *l)
static ListCell * lnext(const List *l, const ListCell *c)
#define list_make2(x1, x2)
#define ERRCODE_UNDEFINED_TABLE
static Datum ObjectIdGetDatum(Oid X)
static bool IsQueryIdEnabled(void)
JumbleState * JumbleQuery(Query *query)
#define RelationGetNumberOfAttributes(relation)
#define RelationGetRelationName(relation)
void check_stack_depth(void)
LockClauseStrength lockStrength
LockClauseStrength lockStrength
ParseNamespaceColumn * p_nscolumns
RTEPermissionInfo * p_perminfo
ParseNamespaceItem * p_target_nsitem
ParseExprKind p_expr_kind
bool p_locked_from_parent
ParseParamRefHook p_paramref_hook
QueryEnvironment * p_queryEnv
const char * p_sourcetext
Relation p_target_relation
CommonTableExpr * p_parent_cte
OnConflictExpr * onConflict
LockClauseStrength strength
LockWaitPolicy waitPolicy
#define FirstLowInvalidHeapAttributeNumber
void ReleaseSysCache(HeapTuple tuple)
HeapTuple SearchSysCache1(SysCacheIdentifier cacheId, Datum key1)
Datum SysCacheGetAttr(SysCacheIdentifier cacheId, HeapTuple tup, AttrNumber attributeNumber, bool *isNull)
static FormData_pg_attribute * TupleDescAttr(TupleDesc tupdesc, int i)
String * makeString(char *str)
bool contain_vars_of_level(Node *node, int levelsup)
int locate_var_of_level(Node *node, int levelsup)