PostgreSQL Source Code git master
Loading...
Searching...
No Matches
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-2026, 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 "nodes/params.h"
18#include "nodes/queryjumble.h"
19#include "parser/parse_node.h"
20
21/* Hook for plugins to get control at end of parse analysis */
23 Query *query,
24 const JumbleState *jstate);
26
27
28extern Query *parse_analyze_fixedparams(RawStmt *parseTree, const char *sourceText,
29 const Oid *paramTypes, int numParams, QueryEnvironment *queryEnv);
30extern Query *parse_analyze_varparams(RawStmt *parseTree, const char *sourceText,
31 Oid **paramTypes, int *numParams, QueryEnvironment *queryEnv);
32extern Query *parse_analyze_withcb(RawStmt *parseTree, const char *sourceText,
33 ParserSetupHook parserSetup,
34 void *parserSetupArg,
35 QueryEnvironment *queryEnv);
36
37extern Query *parse_sub_analyze(Node *parseTree, ParseState *parentParseState,
40 bool resolve_unknowns);
41
47 ForPortionOfExpr *forPortionOf);
48extern void transformReturningClause(ParseState *pstate, Query *qry,
49 ReturningClause *returningClause,
53
56extern bool query_requires_rewrite_plan(Query *query);
57
58extern const char *LCS_asString(LockClauseStrength strength);
59extern void CheckSelectLocking(Query *qry, LockClauseStrength strength);
60extern void applyLockingClause(Query *qry, Index rtindex,
61 LockClauseStrength strength,
62 LockWaitPolicy waitPolicy, bool pushedDown);
63
65 Index exclRelIndex);
66
69 const List *ltargetlist, const List *rtargetlist,
70 List **targetlist, const char *context, bool recursive);
71
72#endif /* ANALYZE_H */
void CheckSelectLocking(Query *qry, LockClauseStrength strength)
Definition analyze.c:3729
SortGroupClause * makeSortGroupClauseForSetOp(Oid rescoltype, bool require_hash)
Definition analyze.c:2369
Query * parse_analyze_withcb(RawStmt *parseTree, const char *sourceText, ParserSetupHook parserSetup, void *parserSetupArg, QueryEnvironment *queryEnv)
Definition analyze.c:208
bool analyze_requires_snapshot(RawStmt *parseTree)
Definition analyze.c:513
List * transformInsertRow(ParseState *pstate, List *exprlist, List *stmtcols, List *icolumns, List *attrnos, bool strip_indirection)
Definition analyze.c:1094
void applyLockingClause(Query *qry, Index rtindex, LockClauseStrength strength, LockWaitPolicy waitPolicy, bool pushedDown)
Definition analyze.c:4020
void constructSetOpTargetlist(ParseState *pstate, SetOperationStmt *op, const List *ltargetlist, const List *rtargetlist, List **targetlist, const char *context, bool recursive)
Definition analyze.c:2601
void(* post_parse_analyze_hook_type)(ParseState *pstate, Query *query, const JumbleState *jstate)
Definition analyze.h:22
void transformReturningClause(ParseState *pstate, Query *qry, ReturningClause *returningClause, ParseExprKind exprKind)
Definition analyze.c:3051
List * transformUpdateTargetList(ParseState *pstate, List *origTlist, ForPortionOfExpr *forPortionOf)
Definition analyze.c:2923
bool query_requires_rewrite_plan(Query *query)
Definition analyze.c:542
Query * transformTopLevelStmt(ParseState *pstate, RawStmt *parseTree)
Definition analyze.c:271
const char * LCS_asString(LockClauseStrength strength)
Definition analyze.c:3704
Query * parse_analyze_fixedparams(RawStmt *parseTree, const char *sourceText, const Oid *paramTypes, int numParams, QueryEnvironment *queryEnv)
Definition analyze.c:127
Query * parse_sub_analyze(Node *parseTree, ParseState *parentParseState, CommonTableExpr *parentCTE, bool locked_from_parent, bool resolve_unknowns)
Definition analyze.c:244
List * BuildOnConflictExcludedTargetlist(Relation targetrel, Index exclRelIndex)
Definition analyze.c:1620
Query * parse_analyze_varparams(RawStmt *parseTree, const char *sourceText, Oid **paramTypes, int *numParams, QueryEnvironment *queryEnv)
Definition analyze.c:167
bool stmt_requires_parse_analysis(RawStmt *parseTree)
Definition analyze.c:469
PGDLLIMPORT post_parse_analyze_hook_type post_parse_analyze_hook
Definition analyze.c:74
Query * transformStmt(ParseState *pstate, Node *parseTree)
Definition analyze.c:334
#define PGDLLIMPORT
Definition c.h:1421
unsigned int Index
Definition c.h:698
LockWaitPolicy
Definition lockoptions.h:38
LockClauseStrength
Definition lockoptions.h:22
void(* ParserSetupHook)(ParseState *pstate, void *arg)
Definition params.h:107
ParseExprKind
Definition parse_node.h:39
unsigned int Oid
static int fb(int x)
Definition pg_list.h:54
Definition nodes.h:135