PostgreSQL Source Code  git master
parse_clause.h
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-2024, 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
16 
17 #include "parser/parse_node.h"
18 
19 extern void transformFromClause(ParseState *pstate, List *frmList);
20 extern int setTargetTable(ParseState *pstate, RangeVar *relation,
21  bool inh, bool alsoSource, AclMode requiredPerms);
22 
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  LimitOption limitOption);
28 extern List *transformGroupClause(ParseState *pstate, List *grouplist,
29  List **groupingSets,
30  List **targetlist, List *sortClause,
31  ParseExprKind exprKind, bool useSQL99);
32 extern List *transformSortClause(ParseState *pstate, List *orderlist,
33  List **targetlist, ParseExprKind exprKind,
34  bool useSQL99);
35 
37  List *windowdefs,
38  List **targetlist);
39 
41  List **targetlist, List *sortClause, bool is_agg);
42 extern List *transformDistinctOnClause(ParseState *pstate, List *distinctlist,
43  List **targetlist, List *sortClause);
44 extern void transformOnConflictArbiter(ParseState *pstate,
45  OnConflictClause *onConflictClause,
46  List **arbiterExpr, Node **arbiterWhere,
47  Oid *constraint);
48 
49 extern List *addTargetToSortList(ParseState *pstate, TargetEntry *tle,
50  List *sortlist, List *targetlist, SortBy *sortby);
51 extern Index assignSortGroupRef(TargetEntry *tle, List *tlist);
52 extern bool targetIsInSortList(TargetEntry *tle, Oid sortop, List *sortList);
53 
54 /* functions in parse_jsontable.c */
56 
57 #endif /* PARSE_CLAUSE_H */
unsigned int Index
Definition: c.h:617
LimitOption
Definition: nodes.h:430
Index assignSortGroupRef(TargetEntry *tle, List *tlist)
List * transformWindowDefinitions(ParseState *pstate, List *windowdefs, List **targetlist)
List * addTargetToSortList(ParseState *pstate, TargetEntry *tle, List *sortlist, List *targetlist, SortBy *sortby)
List * transformDistinctOnClause(ParseState *pstate, List *distinctlist, List **targetlist, List *sortClause)
Node * transformLimitClause(ParseState *pstate, Node *clause, ParseExprKind exprKind, const char *constructName, LimitOption limitOption)
List * transformSortClause(ParseState *pstate, List *orderlist, List **targetlist, ParseExprKind exprKind, bool useSQL99)
Node * transformWhereClause(ParseState *pstate, Node *clause, ParseExprKind exprKind, const char *constructName)
ParseNamespaceItem * transformJsonTable(ParseState *pstate, JsonTable *jt)
void transformFromClause(ParseState *pstate, List *frmList)
Definition: parse_clause.c:112
List * transformGroupClause(ParseState *pstate, List *grouplist, List **groupingSets, List **targetlist, List *sortClause, ParseExprKind exprKind, bool useSQL99)
List * transformDistinctClause(ParseState *pstate, List **targetlist, List *sortClause, bool is_agg)
bool targetIsInSortList(TargetEntry *tle, Oid sortop, List *sortList)
void transformOnConflictArbiter(ParseState *pstate, OnConflictClause *onConflictClause, List **arbiterExpr, Node **arbiterWhere, Oid *constraint)
int setTargetTable(ParseState *pstate, RangeVar *relation, bool inh, bool alsoSource, AclMode requiredPerms)
Definition: parse_clause.c:178
ParseExprKind
Definition: parse_node.h:39
uint64 AclMode
Definition: parsenodes.h:74
unsigned int Oid
Definition: postgres_ext.h:31
Definition: pg_list.h:54
Definition: nodes.h:129