@@ -56,19 +56,20 @@ <h3><em>Click on an item</em> to see more detail or look at the full
56
56
href ="https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/include/nodes/parsenodes.h "> SelectStmt.</ a > </ p >
57
57
58
58
< p > The statement is then identified as complex (< em > SELECT / INSERT /
59
- UPDATE / DELETE</ em > ) or simple, e.g < em > CREATE USER , ANALYZE,</ em >
59
+ UPDATE / DELETE</ em > ) or simple, e.g < em > CREATE ROLE , ANALYZE,</ em >
60
60
etc. Simple utility commands that do not require the executor are processed by statement-specific
61
61
functions in the < a href ="https://wiki.postgresql.org/wiki/Backend_flowchart#commands "> commands</ a > module.
62
62
Complex statements require more handling.</ p >
63
63
64
64
< p > The parser takes a complex query, and creates a < a
65
65
href ="https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/include/nodes/parsenodes.h "> Query</ a >
66
66
structure that contains all the elements used by complex queries.
67
- Query.qual holds the < em > WHERE </ em > clause qualification , which is filled
67
+ Query.jointree holds the < em > FROM </ em > and < em > WHERE </ em > clauses , which is filled
68
68
in by < a
69
- href ="https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/backend/parser/parse_clause.c "> transformWhereClause().</ a >
69
+ href ="https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/backend/parser/parse_clause.c "> transformFromClause()</ a > and
70
+ < a href ="https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/backend/parser/parse_clause.c "> transformWhereClause().</ a >
70
71
Each table referenced in the query is represented by a < a
71
- href ="https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/include/nodes/parsenodes.h "> RangeTableEntry ,</ a >
72
+ href ="https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/include/nodes/parsenodes.h "> RangeTblEntry ,</ a >
72
73
and they are linked together to form the < em > range table</ em > of the
73
74
query, which is generated by < a
74
75
href ="https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/backend/parser/parse_clause.c "> transformFromClause().</ a >
@@ -95,8 +96,8 @@ <h3><em>Click on an item</em> to see more detail or look at the full
95
96
< p > The < a
96
97
href ="https://wiki.postgresql.org/wiki/Backend_flowchart#optimizer_path "> optimizer</ a >
97
98
uses the Query structure to determine the best table join order and join
98
- type of each table in the RangeTable, using Query.qual (< em > WHERE </ em >
99
- clause ) to consider optimal index usage.</ p > The < a
99
+ type of each table in the RangeTable, using Query.jointree (< em > FROM </ em >
100
+ and < em > WHERE </ em > clauses ) to consider optimal index usage.</ p > The < a
100
101
href ="https://wiki.postgresql.org/wiki/Backend_flowchart#optimizer_path "> path</ a >
101
102
module then generates an optimal < a
102
103
href ="https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/include/nodes/plannodes.h "> Plan,</ a >
0 commit comments