Update copyright for 2022
[pgsql.git] / src / include / parser / parse_target.h
blob342e0d008b4bfb1adb88c2fedb26150b139b3959
1 /*-------------------------------------------------------------------------
3 * parse_target.h
4 * handle target lists
7 * Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
10 * src/include/parser/parse_target.h
12 *-------------------------------------------------------------------------
14 #ifndef PARSE_TARGET_H
15 #define PARSE_TARGET_H
17 #include "parser/parse_node.h"
20 extern List *transformTargetList(ParseState *pstate, List *targetlist,
21 ParseExprKind exprKind);
22 extern List *transformExpressionList(ParseState *pstate, List *exprlist,
23 ParseExprKind exprKind, bool allowDefault);
24 extern void resolveTargetListUnknowns(ParseState *pstate, List *targetlist);
25 extern void markTargetListOrigins(ParseState *pstate, List *targetlist);
26 extern TargetEntry *transformTargetEntry(ParseState *pstate,
27 Node *node, Node *expr, ParseExprKind exprKind,
28 char *colname, bool resjunk);
29 extern Expr *transformAssignedExpr(ParseState *pstate, Expr *expr,
30 ParseExprKind exprKind,
31 const char *colname,
32 int attrno,
33 List *indirection,
34 int location);
35 extern void updateTargetListEntry(ParseState *pstate, TargetEntry *tle,
36 char *colname, int attrno,
37 List *indirection,
38 int location);
39 extern Node *transformAssignmentIndirection(ParseState *pstate,
40 Node *basenode,
41 const char *targetName,
42 bool targetIsSubscripting,
43 Oid targetTypeId,
44 int32 targetTypMod,
45 Oid targetCollation,
46 List *indirection,
47 ListCell *indirection_cell,
48 Node *rhs,
49 CoercionContext ccontext,
50 int location);
51 extern List *checkInsertTargets(ParseState *pstate, List *cols,
52 List **attrnos);
53 extern TupleDesc expandRecordVariable(ParseState *pstate, Var *var,
54 int levelsup);
55 extern char *FigureColname(Node *node);
56 extern char *FigureIndexColname(Node *node);
58 #endif /* PARSE_TARGET_H */