PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
makefuncs.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * makefuncs.h
4  * prototypes for the creator functions (for primitive nodes)
5  *
6  *
7  * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * src/include/nodes/makefuncs.h
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef MAKEFUNC_H
15 #define MAKEFUNC_H
16 
17 #include "nodes/parsenodes.h"
18 
19 
20 extern A_Expr *makeA_Expr(A_Expr_Kind kind, List *name,
21  Node *lexpr, Node *rexpr, int location);
22 
23 extern A_Expr *makeSimpleA_Expr(A_Expr_Kind kind, char *name,
24  Node *lexpr, Node *rexpr, int location);
25 
26 extern Var *makeVar(Index varno,
27  AttrNumber varattno,
28  Oid vartype,
29  int32 vartypmod,
30  Oid varcollid,
31  Index varlevelsup);
32 
33 extern Var *makeVarFromTargetEntry(Index varno,
34  TargetEntry *tle);
35 
36 extern Var *makeWholeRowVar(RangeTblEntry *rte,
37  Index varno,
38  Index varlevelsup,
39  bool allowScalar);
40 
41 extern TargetEntry *makeTargetEntry(Expr *expr,
42  AttrNumber resno,
43  char *resname,
44  bool resjunk);
45 
47 
48 extern FromExpr *makeFromExpr(List *fromlist, Node *quals);
49 
50 extern Const *makeConst(Oid consttype,
51  int32 consttypmod,
52  Oid constcollid,
53  int constlen,
54  Datum constvalue,
55  bool constisnull,
56  bool constbyval);
57 
58 extern Const *makeNullConst(Oid consttype, int32 consttypmod, Oid constcollid);
59 
60 extern Node *makeBoolConst(bool value, bool isnull);
61 
62 extern Expr *makeBoolExpr(BoolExprType boolop, List *args, int location);
63 
64 extern Alias *makeAlias(const char *aliasname, List *colnames);
65 
66 extern RelabelType *makeRelabelType(Expr *arg, Oid rtype, int32 rtypmod,
67  Oid rcollid, CoercionForm rformat);
68 
69 extern RangeVar *makeRangeVar(char *schemaname, char *relname, int location);
70 
71 extern TypeName *makeTypeName(char *typnam);
72 extern TypeName *makeTypeNameFromNameList(List *names);
73 extern TypeName *makeTypeNameFromOid(Oid typeOid, int32 typmod);
74 
75 extern ColumnDef *makeColumnDef(const char *colname,
76  Oid typeOid, int32 typmod, Oid collOid);
77 
78 extern FuncExpr *makeFuncExpr(Oid funcid, Oid rettype, List *args,
79  Oid funccollid, Oid inputcollid, CoercionForm fformat);
80 
81 extern FuncCall *makeFuncCall(List *name, List *args, int location);
82 
83 extern DefElem *makeDefElem(char *name, Node *arg, int location);
84 extern DefElem *makeDefElemExtended(char *nameSpace, char *name, Node *arg,
85  DefElemAction defaction, int location);
86 
87 extern GroupingSet *makeGroupingSet(GroupingSetKind kind, List *content, int location);
88 
89 #endif /* MAKEFUNC_H */
Datum boolop(PG_FUNCTION_ARGS)
Definition: _int_bool.c:420
Const * makeConst(Oid consttype, int32 consttypmod, Oid constcollid, int constlen, Datum constvalue, bool constisnull, bool constbyval)
Definition: makefuncs.c:296
TypeName * makeTypeNameFromNameList(List *names)
Definition: makefuncs.c:453
A_Expr * makeSimpleA_Expr(A_Expr_Kind kind, char *name, Node *lexpr, Node *rexpr, int location)
Definition: makefuncs.c:49
RangeVar * makeRangeVar(char *schemaname, char *relname, int location)
Definition: makefuncs.c:419
Definition: nodes.h:506
unsigned int Oid
Definition: postgres_ext.h:31
FromExpr * makeFromExpr(List *fromlist, Node *quals)
Definition: makefuncs.c:282
Definition: primnodes.h:163
Node * makeBoolConst(bool value, bool isnull)
Definition: makefuncs.c:354
signed int int32
Definition: c.h:256
RelabelType * makeRelabelType(Expr *arg, Oid rtype, int32 rtypmod, Oid rcollid, CoercionForm rformat)
Definition: makefuncs.c:399
static struct @114 value
TargetEntry * makeTargetEntry(Expr *expr, AttrNumber resno, char *resname, bool resjunk)
Definition: makefuncs.c:235
Var * makeVar(Index varno, AttrNumber varattno, Oid vartype, int32 vartypmod, Oid varcollid, Index varlevelsup)
Definition: makefuncs.c:67
DefElem * makeDefElem(char *name, Node *arg, int location)
Definition: makefuncs.c:543
A_Expr * makeA_Expr(A_Expr_Kind kind, List *name, Node *lexpr, Node *rexpr, int location)
Definition: makefuncs.c:31
Alias * makeAlias(const char *aliasname, List *colnames)
Definition: makefuncs.c:384
Expr * makeBoolExpr(BoolExprType boolop, List *args, int location)
Definition: makefuncs.c:366
uintptr_t Datum
Definition: postgres.h:372
TypeName * makeTypeName(char *typnam)
Definition: makefuncs.c:441
unsigned int Index
Definition: c.h:365
GroupingSet * makeGroupingSet(GroupingSetKind kind, List *content, int location)
Definition: makefuncs.c:604
ColumnDef * makeColumnDef(const char *colname, Oid typeOid, int32 typmod, Oid collOid)
Definition: makefuncs.c:487
Const * makeNullConst(Oid consttype, int32 consttypmod, Oid constcollid)
Definition: makefuncs.c:334
FuncCall * makeFuncCall(List *name, List *args, int location)
Definition: makefuncs.c:582
A_Expr_Kind
Definition: parsenodes.h:243
FuncExpr * makeFuncExpr(Oid funcid, Oid rettype, List *args, Oid funccollid, Oid inputcollid, CoercionForm fformat)
Definition: makefuncs.c:516
Var * makeVarFromTargetEntry(Index varno, TargetEntry *tle)
Definition: makefuncs.c:104
const char * name
Definition: encode.c:521
Var * makeWholeRowVar(RangeTblEntry *rte, Index varno, Index varlevelsup, bool allowScalar)
Definition: makefuncs.c:132
DefElemAction
Definition: parsenodes.h:696
void * arg
GroupingSetKind
Definition: parsenodes.h:1198
TypeName * makeTypeNameFromOid(Oid typeOid, int32 typmod)
Definition: makefuncs.c:469
CoercionForm
Definition: primnodes.h:435
TargetEntry * flatCopyTargetEntry(TargetEntry *src_tle)
Definition: makefuncs.c:268
Definition: pg_list.h:45
int16 AttrNumber
Definition: attnum.h:21
DefElem * makeDefElemExtended(char *nameSpace, char *name, Node *arg, DefElemAction defaction, int location)
Definition: makefuncs.c:561
BoolExprType
Definition: primnodes.h:553