Header And Logo

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

analyze.h

Go to the documentation of this file.
00001 /*-------------------------------------------------------------------------
00002  *
00003  * analyze.h
00004  *      parse analysis for optimizable statements
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/analyze.h
00011  *
00012  *-------------------------------------------------------------------------
00013  */
00014 #ifndef ANALYZE_H
00015 #define ANALYZE_H
00016 
00017 #include "parser/parse_node.h"
00018 
00019 /* Hook for plugins to get control at end of parse analysis */
00020 typedef void (*post_parse_analyze_hook_type) (ParseState *pstate,
00021                                                           Query *query);
00022 extern PGDLLIMPORT post_parse_analyze_hook_type post_parse_analyze_hook;
00023 
00024 
00025 extern Query *parse_analyze(Node *parseTree, const char *sourceText,
00026               Oid *paramTypes, int numParams);
00027 extern Query *parse_analyze_varparams(Node *parseTree, const char *sourceText,
00028                         Oid **paramTypes, int *numParams);
00029 
00030 extern Query *parse_sub_analyze(Node *parseTree, ParseState *parentParseState,
00031                   CommonTableExpr *parentCTE,
00032                   bool locked_from_parent);
00033 
00034 extern Query *transformTopLevelStmt(ParseState *pstate, Node *parseTree);
00035 extern Query *transformStmt(ParseState *pstate, Node *parseTree);
00036 
00037 extern bool analyze_requires_snapshot(Node *parseTree);
00038 
00039 extern void CheckSelectLocking(Query *qry);
00040 extern void applyLockingClause(Query *qry, Index rtindex,
00041                    LockClauseStrength strength, bool noWait, bool pushedDown);
00042 
00043 #endif   /* ANALYZE_H */