1 /*-------------------------------------------------------------------------
4 * handle clauses in parser
7 * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
10 * $PostgreSQL: pgsql/src/include/parser/parse_clause.h,v 1.56 2009/08/27 20:08:02 tgl Exp $
12 *-------------------------------------------------------------------------
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);
22 extern bool interpretInhOption(InhOption inhOpt);
23 extern bool interpretOidsOption(List *defList);
25 extern Node *transformWhereClause(ParseState *pstate, Node *clause,
26 const char *constructName);
27 extern Node *transformLimitClause(ParseState *pstate, Node *clause,
28 const char *constructName);
29 extern List *transformGroupClause(ParseState *pstate, List *grouplist,
30 List **targetlist, List *sortClause,
32 extern List *transformSortClause(ParseState *pstate, List *orderlist,
33 List **targetlist, bool resolveUnknown, bool isWindowFunc);
35 extern List *transformWindowDefinitions(ParseState *pstate,
39 extern List *transformDistinctClause(ParseState *pstate,
40 List **targetlist, List *sortClause);
41 extern List *transformDistinctOnClause(ParseState *pstate, List *distinctlist,
42 List **targetlist, List *sortClause);
44 extern Index assignSortGroupRef(TargetEntry *tle, List *tlist);
45 extern bool targetIsInSortList(TargetEntry *tle, Oid sortop, List *sortList);
47 #endif /* PARSE_CLAUSE_H */