PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
analyze.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * analyze.h
4  * parse analysis for optimizable statements
5  *
6  *
7  * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * src/include/parser/analyze.h
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef ANALYZE_H
15 #define ANALYZE_H
16 
17 #include "parser/parse_node.h"
18 
19 /* Hook for plugins to get control at end of parse analysis */
20 typedef void (*post_parse_analyze_hook_type) (ParseState *pstate,
21  Query *query);
23 
24 
25 extern Query *parse_analyze(RawStmt *parseTree, const char *sourceText,
26  Oid *paramTypes, int numParams);
27 extern Query *parse_analyze_varparams(RawStmt *parseTree, const char *sourceText,
28  Oid **paramTypes, int *numParams);
29 
30 extern Query *parse_sub_analyze(Node *parseTree, ParseState *parentParseState,
31  CommonTableExpr *parentCTE,
32  bool locked_from_parent,
33  bool resolve_unknowns);
34 
35 extern Query *transformTopLevelStmt(ParseState *pstate, RawStmt *parseTree);
36 extern Query *transformStmt(ParseState *pstate, Node *parseTree);
37 
38 extern bool analyze_requires_snapshot(RawStmt *parseTree);
39 
40 extern const char *LCS_asString(LockClauseStrength strength);
41 extern void CheckSelectLocking(Query *qry, LockClauseStrength strength);
42 extern void applyLockingClause(Query *qry, Index rtindex,
43  LockClauseStrength strength,
44  LockWaitPolicy waitPolicy, bool pushedDown);
45 
46 #endif /* ANALYZE_H */
Query * parse_sub_analyze(Node *parseTree, ParseState *parentParseState, CommonTableExpr *parentCTE, bool locked_from_parent, bool resolve_unknowns)
Definition: analyze.c:157
void(* post_parse_analyze_hook_type)(ParseState *pstate, Query *query)
Definition: analyze.h:20
const char * LCS_asString(LockClauseStrength strength)
Definition: analyze.c:2576
PGDLLIMPORT post_parse_analyze_hook_type post_parse_analyze_hook
Definition: analyze.c:49
void applyLockingClause(Query *qry, Index rtindex, LockClauseStrength strength, LockWaitPolicy waitPolicy, bool pushedDown)
Definition: analyze.c:2818
Query * transformTopLevelStmt(ParseState *pstate, RawStmt *parseTree)
Definition: analyze.c:184
Query * transformStmt(ParseState *pstate, Node *parseTree)
Definition: analyze.c:247
Definition: nodes.h:508
Query * parse_analyze(RawStmt *parseTree, const char *sourceText, Oid *paramTypes, int numParams)
Definition: analyze.c:96
unsigned int Oid
Definition: postgres_ext.h:31
#define PGDLLIMPORT
Definition: c.h:1063
Query * parse_analyze_varparams(RawStmt *parseTree, const char *sourceText, Oid **paramTypes, int *numParams)
Definition: analyze.c:127
void CheckSelectLocking(Query *qry, LockClauseStrength strength)
Definition: analyze.c:2601
LockClauseStrength
Definition: lockoptions.h:21
unsigned int Index
Definition: c.h:362
bool analyze_requires_snapshot(RawStmt *parseTree)
Definition: analyze.c:345
LockWaitPolicy
Definition: lockoptions.h:36