Header And Logo

PostgreSQL
| The world's most advanced open source database.

parse_clause.h

Go to the documentation of this file.
00001 /*-------------------------------------------------------------------------
00002  *
00003  * parse_clause.h
00004  *    handle clauses in parser
00005  *
00006  *
00007  * Portions Copyright (c) 1996-2013, PostgreSQL Global Development Group
00008  * Portions Copyright (c) 1994, Regents of the University of California
00009  *
00010  * src/include/parser/parse_clause.h
00011  *
00012  *-------------------------------------------------------------------------
00013  */
00014 #ifndef PARSE_CLAUSE_H
00015 #define PARSE_CLAUSE_H
00016 
00017 #include "parser/parse_node.h"
00018 
00019 extern void transformFromClause(ParseState *pstate, List *frmList);
00020 extern int setTargetTable(ParseState *pstate, RangeVar *relation,
00021                bool inh, bool alsoSource, AclMode requiredPerms);
00022 extern bool interpretInhOption(InhOption inhOpt);
00023 extern bool interpretOidsOption(List *defList, bool allowOids);
00024 
00025 extern Node *transformWhereClause(ParseState *pstate, Node *clause,
00026                      ParseExprKind exprKind, const char *constructName);
00027 extern Node *transformLimitClause(ParseState *pstate, Node *clause,
00028                      ParseExprKind exprKind, const char *constructName);
00029 extern List *transformGroupClause(ParseState *pstate, List *grouplist,
00030                      List **targetlist, List *sortClause,
00031                      ParseExprKind exprKind, bool useSQL99);
00032 extern List *transformSortClause(ParseState *pstate, List *orderlist,
00033                     List **targetlist, ParseExprKind exprKind,
00034                     bool resolveUnknown, bool useSQL99);
00035 
00036 extern List *transformWindowDefinitions(ParseState *pstate,
00037                            List *windowdefs,
00038                            List **targetlist);
00039 
00040 extern List *transformDistinctClause(ParseState *pstate,
00041                         List **targetlist, List *sortClause, bool is_agg);
00042 extern List *transformDistinctOnClause(ParseState *pstate, List *distinctlist,
00043                           List **targetlist, List *sortClause);
00044 
00045 extern Index assignSortGroupRef(TargetEntry *tle, List *tlist);
00046 extern bool targetIsInSortList(TargetEntry *tle, Oid sortop, List *sortList);
00047 
00048 #endif   /* PARSE_CLAUSE_H */