pg.ddx.io pgsql-docs@postgresql.org mailing list archive
help / color / mirror / Atom feedBackend Flowchart / Developer doc
7+ messages / 4 participants
[nested] [flat]
* Backend Flowchart / Developer doc
@ 2020-04-15 11:12 Marc Rechté <marc4@rechte.fr>
0 siblings, 1 reply; 7+ messages in thread
From: Marc Rechté @ 2020-04-15 11:12 UTC (permalink / raw)
To: pgsql-docs
Hello,
Don't know if this the correct list to submit this issue.
On the https://www.postgresql.org/developer/backend/, it mentions a
Query.qual field which does not exist in the Query structure.
Thanks
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Backend Flowchart / Developer doc
@ 2020-04-16 15:17 Alvaro Herrera <alvherre@2ndquadrant.com>
parent: Marc Rechté <marc4@rechte.fr>
0 siblings, 1 reply; 7+ messages in thread
From: Alvaro Herrera @ 2020-04-16 15:17 UTC (permalink / raw)
To: Marc Rechté <marc4@rechte.fr>; +Cc: pgsql-docs
On 2020-Apr-15, Marc Rechté wrote:
> Hello,
>
> Don't know if this the correct list to submit this issue.
>
> On the https://www.postgresql.org/developer/backend/, it mentions a
> Query.qual field which does not exist in the Query structure.
I think that diagram (and the accompanying wiki page) requires a *lot*
of more significant updating than just that field. It is wildly
outdated.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Backend Flowchart / Developer doc
@ 2020-04-21 15:31 Bruce Momjian <bruce@momjian.us>
parent: Alvaro Herrera <alvherre@2ndquadrant.com>
0 siblings, 1 reply; 7+ messages in thread
From: Bruce Momjian @ 2020-04-21 15:31 UTC (permalink / raw)
To: Alvaro Herrera <alvherre@2ndquadrant.com>; +Cc: Marc Rechté <marc4@rechte.fr>; pgsql-docs
On Thu, Apr 16, 2020 at 11:17:29AM -0400, Alvaro Herrera wrote:
> On 2020-Apr-15, Marc Rechté wrote:
>
> > Hello,
> >
> > Don't know if this the correct list to submit this issue.
> >
> > On the https://www.postgresql.org/developer/backend/, it mentions a
> > Query.qual field which does not exist in the Query structure.
>
> I think that diagram (and the accompanying wiki page) requires a *lot*
> of more significant updating than just that field. It is wildly
> outdated.
I developed the attached patch to fix the items I saw needed updating.
--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EnterpriseDB https://enterprisedb.com
+ As you are, so once was I. As I am, so you will be. +
+ Ancient Roman grave inscription +
Attachments:
backend.diff (text/x-diff, 2.7K) download
diff --git a/templates/pages/developer/backend.html b/templates/pages/developer/backend.html
index ab7e5d6..7337a07 100644
--- a/templates/pages/developer/backend.html
+++ b/templates/pages/developer/backend.html
@@ -56,7 +56,7 @@ or <a
href="https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/include/nodes/parsenodes.h">SelectStmt.</a></p>
<p>The statement is then identified as complex (<em>SELECT / INSERT /
-UPDATE / DELETE</em>) or simple, e.g <em>CREATE USER, ANALYZE,</em>
+UPDATE / DELETE</em>) or simple, e.g <em>CREATE ROLE, ANALYZE,</em>
etc. Simple utility commands that do not require the executor are processed by statement-specific
functions in the <a href="https://wiki.postgresql.org/wiki/Backend_flowchart#commands">commands</a> module.
Complex statements require more handling.</p>
@@ -64,11 +64,12 @@ Complex statements require more handling.</p>
<p>The parser takes a complex query, and creates a <a
href="https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/include/nodes/parsenodes.h">Query</a>
structure that contains all the elements used by complex queries.
-Query.qual holds the <em>WHERE</em> clause qualification, which is filled
+Query.jointree holds the <em>FROM</em> and <em>WHERE</em> clauses, which is filled
in by <a
+href="https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/backend/parser/parse_clause.c">transformFromClause()</a> and
href="https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/backend/parser/parse_clause.c">transformWhereClause().</a>
Each table referenced in the query is represented by a <a
-href="https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/include/nodes/parsenodes.h">RangeTableEntry,</a>
+href="https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/include/nodes/parsenodes.h">RangeTblEntry,</a>
and they are linked together to form the <em>range table</em> of the
query, which is generated by <a
href="https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/backend/parser/parse_clause.c">transformFromClause().</a>
@@ -95,8 +96,8 @@ system.</p>
<p>The <a
href="https://wiki.postgresql.org/wiki/Backend_flowchart#optimizer_path">optimizer</a>
uses the Query structure to determine the best table join order and join
-type of each table in the RangeTable, using Query.qual(<em>WHERE</em>
-clause) to consider optimal index usage.</p> The <a
+type of each table in the RangeTable, using Query.jointree(<em>FROM</em>
+and <em>WHERE</em> clauses) to consider optimal index usage.</p> The <a
href="https://wiki.postgresql.org/wiki/Backend_flowchart#optimizer_path">path</a>
module then generates an optimal <a
href="https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/include/nodes/plannodes.h">Plan,</a>
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Backend Flowchart / Developer doc
@ 2020-04-23 17:06 Bruce Momjian <bruce@momjian.us>
parent: Bruce Momjian <bruce@momjian.us>
0 siblings, 1 reply; 7+ messages in thread
From: Bruce Momjian @ 2020-04-23 17:06 UTC (permalink / raw)
To: Alvaro Herrera <alvherre@2ndquadrant.com>; +Cc: Marc Rechté <marc4@rechte.fr>; PostgreSQL www <pgsql-www@postgresql.org>
Thread moved to www for patch application. Please apply the attached
patch to update the text of the backend flowchart. Thanks.
---------------------------------------------------------------------------
On Tue, Apr 21, 2020 at 11:31:09AM -0400, Bruce Momjian wrote:
> On Thu, Apr 16, 2020 at 11:17:29AM -0400, Alvaro Herrera wrote:
> > On 2020-Apr-15, Marc Rechté wrote:
> >
> > > Hello,
> > >
> > > Don't know if this the correct list to submit this issue.
> > >
> > > On the https://www.postgresql.org/developer/backend/, it mentions a
> > > Query.qual field which does not exist in the Query structure.
> >
> > I think that diagram (and the accompanying wiki page) requires a *lot*
> > of more significant updating than just that field. It is wildly
> > outdated.
>
> I developed the attached patch to fix the items I saw needed updating.
--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EnterpriseDB https://enterprisedb.com
+ As you are, so once was I. As I am, so you will be. +
+ Ancient Roman grave inscription +
Attachments:
backend.diff (text/x-diff, 2.7K) download
diff --git a/templates/pages/developer/backend.html b/templates/pages/developer/backend.html
index ab7e5d6..7337a07 100644
--- a/templates/pages/developer/backend.html
+++ b/templates/pages/developer/backend.html
@@ -56,7 +56,7 @@ or <a
href="https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/include/nodes/parsenodes.h">SelectStmt.</a></p>
<p>The statement is then identified as complex (<em>SELECT / INSERT /
-UPDATE / DELETE</em>) or simple, e.g <em>CREATE USER, ANALYZE,</em>
+UPDATE / DELETE</em>) or simple, e.g <em>CREATE ROLE, ANALYZE,</em>
etc. Simple utility commands that do not require the executor are processed by statement-specific
functions in the <a href="https://wiki.postgresql.org/wiki/Backend_flowchart#commands">commands</a> module.
Complex statements require more handling.</p>
@@ -64,11 +64,12 @@ Complex statements require more handling.</p>
<p>The parser takes a complex query, and creates a <a
href="https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/include/nodes/parsenodes.h">Query</a>
structure that contains all the elements used by complex queries.
-Query.qual holds the <em>WHERE</em> clause qualification, which is filled
+Query.jointree holds the <em>FROM</em> and <em>WHERE</em> clauses, which is filled
in by <a
+href="https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/backend/parser/parse_clause.c">transformFromClause()</a> and
href="https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/backend/parser/parse_clause.c">transformWhereClause().</a>
Each table referenced in the query is represented by a <a
-href="https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/include/nodes/parsenodes.h">RangeTableEntry,</a>
+href="https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/include/nodes/parsenodes.h">RangeTblEntry,</a>
and they are linked together to form the <em>range table</em> of the
query, which is generated by <a
href="https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/backend/parser/parse_clause.c">transformFromClause().</a>
@@ -95,8 +96,8 @@ system.</p>
<p>The <a
href="https://wiki.postgresql.org/wiki/Backend_flowchart#optimizer_path">optimizer</a>
uses the Query structure to determine the best table join order and join
-type of each table in the RangeTable, using Query.qual(<em>WHERE</em>
-clause) to consider optimal index usage.</p> The <a
+type of each table in the RangeTable, using Query.jointree(<em>FROM</em>
+and <em>WHERE</em> clauses) to consider optimal index usage.</p> The <a
href="https://wiki.postgresql.org/wiki/Backend_flowchart#optimizer_path">path</a>
module then generates an optimal <a
href="https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/include/nodes/plannodes.h">Plan,</a>
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Backend Flowchart / Developer doc
@ 2020-04-23 17:32 Jonathan S. Katz <jkatz@postgresql.org>
parent: Bruce Momjian <bruce@momjian.us>
0 siblings, 1 reply; 7+ messages in thread
From: Jonathan S. Katz @ 2020-04-23 17:32 UTC (permalink / raw)
To: Bruce Momjian <bruce@momjian.us>; Alvaro Herrera <alvherre@2ndquadrant.com>; +Cc: Marc Rechté <marc4@rechte.fr>; PostgreSQL www <pgsql-www@postgresql.org>
On 4/23/20 1:06 PM, Bruce Momjian wrote:
>
> Thread moved to www for patch application. Please apply the attached
> patch to update the text of the backend flowchart. Thanks.
Well, we first review and test it ;) There was a broken anchor tag,
which I fixed, and have now committed the patch.
Thanks!
Jonathan
Attachments:
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Backend Flowchart / Developer doc
@ 2020-04-23 17:33 Bruce Momjian <bruce@momjian.us>
parent: Jonathan S. Katz <jkatz@postgresql.org>
0 siblings, 1 reply; 7+ messages in thread
From: Bruce Momjian @ 2020-04-23 17:33 UTC (permalink / raw)
To: Jonathan S. Katz <jkatz@postgresql.org>; +Cc: Alvaro Herrera <alvherre@2ndquadrant.com>; Marc Rechté <marc4@rechte.fr>; PostgreSQL www <pgsql-www@postgresql.org>
On Thu, Apr 23, 2020 at 01:32:52PM -0400, Jonathan Katz wrote:
> On 4/23/20 1:06 PM, Bruce Momjian wrote:
> >
> > Thread moved to www for patch application. Please apply the attached
> > patch to update the text of the backend flowchart. Thanks.
>
> Well, we first review and test it ;) There was a broken anchor tag,
> which I fixed, and have now committed the patch.
Thanks. I should have tested it myself.
--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EnterpriseDB https://enterprisedb.com
+ As you are, so once was I. As I am, so you will be. +
+ Ancient Roman grave inscription +
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Backend Flowchart / Developer doc
@ 2020-04-23 17:35 Jonathan S. Katz <jkatz@postgresql.org>
parent: Bruce Momjian <bruce@momjian.us>
0 siblings, 0 replies; 7+ messages in thread
From: Jonathan S. Katz @ 2020-04-23 17:35 UTC (permalink / raw)
To: Bruce Momjian <bruce@momjian.us>; +Cc: Alvaro Herrera <alvherre@2ndquadrant.com>; Marc Rechté <marc4@rechte.fr>; PostgreSQL www <pgsql-www@postgresql.org>
On 4/23/20 1:33 PM, Bruce Momjian wrote:
> On Thu, Apr 23, 2020 at 01:32:52PM -0400, Jonathan Katz wrote:
>> On 4/23/20 1:06 PM, Bruce Momjian wrote:
>>>
>>> Thread moved to www for patch application. Please apply the attached
>>> patch to update the text of the backend flowchart. Thanks.
>>
>> Well, we first review and test it ;) There was a broken anchor tag,
>> which I fixed, and have now committed the patch.
>
> Thanks. I should have tested it myself.
No worries. Content updates that span only a few lines tend to be fairly
easy to review/test. The important piece is the contribution.
Jonathan
Attachments:
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2020-04-23 17:35 UTC | newest]
Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-04-15 11:12 Backend Flowchart / Developer doc Marc Rechté <marc4@rechte.fr>
2020-04-16 15:17 ` Alvaro Herrera <alvherre@2ndquadrant.com>
2020-04-21 15:31 ` Bruce Momjian <bruce@momjian.us>
2020-04-23 17:06 ` Bruce Momjian <bruce@momjian.us>
2020-04-23 17:32 ` Jonathan S. Katz <jkatz@postgresql.org>
2020-04-23 17:33 ` Bruce Momjian <bruce@momjian.us>
2020-04-23 17:35 ` Jonathan S. Katz <jkatz@postgresql.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox