Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7db9ea5

Browse files
committed
EXPLAIN VERBOSE prints the plan, and now pretty-prints the plan to
the postmaster log file.
1 parentf71b671 commit7db9ea5

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

‎src/backend/commands/explain.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/commands/explain.c,v 1.21 1998/08/0404:50:15 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/explain.c,v 1.22 1998/08/0415:00:26 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -30,7 +30,7 @@ typedef struct ExplainState
3030
{
3131
/* options */
3232
boolprintCost;/* print cost */
33-
boolprintNodes;/* dopprint() instead */
33+
boolprintNodes;/* donodeToString() instead */
3434
/* other states */
3535
List*rtable;/* range table */
3636
}ExplainState;
@@ -81,8 +81,11 @@ ExplainQuery(Query *query, bool verbose, CommandDest dest)
8181
es->rtable=query->rtable;
8282

8383
if (es->printNodes)
84-
s=pprint(plan);
85-
84+
{
85+
pprint(plan);/* display in postmaster log file */
86+
s=nodeToString(plan);
87+
}
88+
8689
if (es->printCost)
8790
{
8891
s2=Explain_PlanToString(plan,es);

‎src/man/explain.l

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.\" This is -*-nroff-*-
22
.\" XXX standard disclaimer belongs here....
3-
.\" $Header: /cvsroot/pgsql/src/man/Attic/explain.l,v 1.9 1998/02/10 04:02:59 momjian Exp $
3+
.\" $Header: /cvsroot/pgsql/src/man/Attic/explain.l,v 1.10 1998/08/04 15:00:28 momjian Exp $
44
.TH EXPLAIN SQL 06/12/97 PostgreSQL PostgreSQL
55
.SH NAME
66
explain - explains statement execution details
@@ -11,7 +11,8 @@ explain - explains statement execution details
1111
.SH DESCRIPTION
1212
This command outputs details about the supplied query. The default
1313
output is the computed query cost.\f2verbose\f1 displays the full query
14-
plan and cost.
14+
plan and cost to your screen, and pretty-prints the plan to the postmaster
15+
log file.
1516

1617
.SH EXAMPLES
1718
In the examples, the table has a single column of float4.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp