00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef MAKEFUNC_H
00015 #define MAKEFUNC_H
00016
00017 #include "nodes/parsenodes.h"
00018
00019
00020 extern A_Expr *makeA_Expr(A_Expr_Kind kind, List *name,
00021 Node *lexpr, Node *rexpr, int location);
00022
00023 extern A_Expr *makeSimpleA_Expr(A_Expr_Kind kind, char *name,
00024 Node *lexpr, Node *rexpr, int location);
00025
00026 extern Var *makeVar(Index varno,
00027 AttrNumber varattno,
00028 Oid vartype,
00029 int32 vartypmod,
00030 Oid varcollid,
00031 Index varlevelsup);
00032
00033 extern Var *makeVarFromTargetEntry(Index varno,
00034 TargetEntry *tle);
00035
00036 extern Var *makeWholeRowVar(RangeTblEntry *rte,
00037 Index varno,
00038 Index varlevelsup,
00039 bool allowScalar);
00040
00041 extern TargetEntry *makeTargetEntry(Expr *expr,
00042 AttrNumber resno,
00043 char *resname,
00044 bool resjunk);
00045
00046 extern TargetEntry *flatCopyTargetEntry(TargetEntry *src_tle);
00047
00048 extern FromExpr *makeFromExpr(List *fromlist, Node *quals);
00049
00050 extern Const *makeConst(Oid consttype,
00051 int32 consttypmod,
00052 Oid constcollid,
00053 int constlen,
00054 Datum constvalue,
00055 bool constisnull,
00056 bool constbyval);
00057
00058 extern Const *makeNullConst(Oid consttype, int32 consttypmod, Oid constcollid);
00059
00060 extern Node *makeBoolConst(bool value, bool isnull);
00061
00062 extern Expr *makeBoolExpr(BoolExprType boolop, List *args, int location);
00063
00064 extern Alias *makeAlias(const char *aliasname, List *colnames);
00065
00066 extern RelabelType *makeRelabelType(Expr *arg, Oid rtype, int32 rtypmod,
00067 Oid rcollid, CoercionForm rformat);
00068
00069 extern RangeVar *makeRangeVar(char *schemaname, char *relname, int location);
00070
00071 extern TypeName *makeTypeName(char *typnam);
00072 extern TypeName *makeTypeNameFromNameList(List *names);
00073 extern TypeName *makeTypeNameFromOid(Oid typeOid, int32 typmod);
00074
00075 extern FuncExpr *makeFuncExpr(Oid funcid, Oid rettype, List *args,
00076 Oid funccollid, Oid inputcollid, CoercionForm fformat);
00077
00078 extern DefElem *makeDefElem(char *name, Node *arg);
00079 extern DefElem *makeDefElemExtended(char *nameSpace, char *name, Node *arg,
00080 DefElemAction defaction);
00081
00082 #endif