PostgreSQL Source Code  git master
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * parse_clause.h
4  * handle clauses in parser
5  *
6  *
7  * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * src/include/parser/parse_clause.h
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef PARSE_CLAUSE_H
15 #define PARSE_CLAUSE_H
17 #include "parser/parse_node.h"
19 extern void transformFromClause(ParseState *pstate, List *frmList);
20 extern int setTargetTable(ParseState *pstate, RangeVar *relation,
21  bool inh, bool alsoSource, AclMode requiredPerms);
23 extern Node *transformWhereClause(ParseState *pstate, Node *clause,
24  ParseExprKind exprKind, const char *constructName);
25 extern Node *transformLimitClause(ParseState *pstate, Node *clause,
26  ParseExprKind exprKind, const char *constructName);
27 extern List *transformGroupClause(ParseState *pstate, List *grouplist,
28  List **groupingSets,
29  List **targetlist, List *sortClause,
30  ParseExprKind exprKind, bool useSQL99);
31 extern List *transformSortClause(ParseState *pstate, List *orderlist,
32  List **targetlist, ParseExprKind exprKind,
33  bool useSQL99);
36  List *windowdefs,
37  List **targetlist);
40  List **targetlist, List *sortClause, bool is_agg);
41 extern List *transformDistinctOnClause(ParseState *pstate, List *distinctlist,
42  List **targetlist, List *sortClause);
43 extern void transformOnConflictArbiter(ParseState *pstate,
44  OnConflictClause *onConflictClause,
45  List **arbiterExpr, Node **arbiterWhere,
46  Oid *constraint);
48 extern List *addTargetToSortList(ParseState *pstate, TargetEntry *tle,
49  List *sortlist, List *targetlist, SortBy *sortby);
50 extern Index assignSortGroupRef(TargetEntry *tle, List *tlist);
51 extern bool targetIsInSortList(TargetEntry *tle, Oid sortop, List *sortList);
53 #endif /* PARSE_CLAUSE_H */
List * addTargetToSortList(ParseState *pstate, TargetEntry *tle, List *sortlist, List *targetlist, SortBy *sortby)
bool targetIsInSortList(TargetEntry *tle, Oid sortop, List *sortList)
List * transformDistinctOnClause(ParseState *pstate, List *distinctlist, List **targetlist, List *sortClause)
Node * transformWhereClause(ParseState *pstate, Node *clause, ParseExprKind exprKind, const char *constructName)
List * transformSortClause(ParseState *pstate, List *orderlist, List **targetlist, ParseExprKind exprKind, bool useSQL99)
Definition: nodes.h:525
Node * transformLimitClause(ParseState *pstate, Node *clause, ParseExprKind exprKind, const char *constructName)
unsigned int Oid
Definition: postgres_ext.h:31
Definition: parse_node.h:38
uint32 AclMode
Definition: parsenodes.h:72
List * transformWindowDefinitions(ParseState *pstate, List *windowdefs, List **targetlist)
void transformFromClause(ParseState *pstate, List *frmList)
Definition: parse_clause.c:114
int setTargetTable(ParseState *pstate, RangeVar *relation, bool inh, bool alsoSource, AclMode requiredPerms)
Definition: parse_clause.c:178
void transformOnConflictArbiter(ParseState *pstate, OnConflictClause *onConflictClause, List **arbiterExpr, Node **arbiterWhere, Oid *constraint)
List * transformGroupClause(ParseState *pstate, List *grouplist, List **groupingSets, List **targetlist, List *sortClause, ParseExprKind exprKind, bool useSQL99)
unsigned int Index
Definition: c.h:476
List * transformDistinctClause(ParseState *pstate, List **targetlist, List *sortClause, bool is_agg)
Index assignSortGroupRef(TargetEntry *tle, List *tlist)
Definition: pg_list.h:50