summaryrefslogtreecommitdiffstats
path: root/src/include/parser/analyze.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:15:05 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:15:05 +0000
commit46651ce6fe013220ed397add242004d764fc0153 (patch)
tree6e5299f990f88e60174a1d3ae6e48eedd2688b2b /src/include/parser/analyze.h
parentInitial commit. (diff)
downloadpostgresql-14-upstream.tar.xz
postgresql-14-upstream.zip
Adding upstream version 14.5.upstream/14.5upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/include/parser/analyze.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/src/include/parser/analyze.h b/src/include/parser/analyze.h
new file mode 100644
index 0000000..a0f0bd3
--- /dev/null
+++ b/src/include/parser/analyze.h
@@ -0,0 +1,53 @@
+/*-------------------------------------------------------------------------
+ *
+ * analyze.h
+ * parse analysis for optimizable statements
+ *
+ *
+ * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ * src/include/parser/analyze.h
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifndef ANALYZE_H
+#define ANALYZE_H
+
+#include "parser/parse_node.h"
+#include "utils/queryjumble.h"
+
+/* Hook for plugins to get control at end of parse analysis */
+typedef void (*post_parse_analyze_hook_type) (ParseState *pstate,
+ Query *query,
+ JumbleState *jstate);
+extern PGDLLIMPORT post_parse_analyze_hook_type post_parse_analyze_hook;
+
+
+extern Query *parse_analyze(RawStmt *parseTree, const char *sourceText,
+ Oid *paramTypes, int numParams, QueryEnvironment *queryEnv);
+extern Query *parse_analyze_varparams(RawStmt *parseTree, const char *sourceText,
+ Oid **paramTypes, int *numParams);
+
+extern Query *parse_sub_analyze(Node *parseTree, ParseState *parentParseState,
+ CommonTableExpr *parentCTE,
+ bool locked_from_parent,
+ bool resolve_unknowns);
+
+extern Query *transformTopLevelStmt(ParseState *pstate, RawStmt *parseTree);
+extern Query *transformStmt(ParseState *pstate, Node *parseTree);
+
+extern bool analyze_requires_snapshot(RawStmt *parseTree);
+
+extern const char *LCS_asString(LockClauseStrength strength);
+extern void CheckSelectLocking(Query *qry, LockClauseStrength strength);
+extern void applyLockingClause(Query *qry, Index rtindex,
+ LockClauseStrength strength,
+ LockWaitPolicy waitPolicy, bool pushedDown);
+
+extern List *BuildOnConflictExcludedTargetlist(Relation targetrel,
+ Index exclRelIndex);
+
+extern SortGroupClause *makeSortGroupClauseForSetOp(Oid rescoltype, bool require_hash);
+
+#endif /* ANALYZE_H */