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

Commit77cb08b

Browse files
committed
Avoid including explain.h in explain_format.h and explain_dr.h
As per a suggestion from Tom Lane, we do this by declaring "structExplainState" here and refer to that rather than "ExplainState".Also per Tom, CreateExplainSerializeDestReceiver was still definedin explain.h in addition to explain_dr.h. Remove leftover prototype.Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>Discussion:http://postgr.es/m/CA+TgmoYtaad3i21V0jqua-fbr+CR0ix6uBvEX8_s6BG96abd=g@mail.gmail.com
1 parent51d3e27 commit77cb08b

File tree

5 files changed

+30
-23
lines changed

5 files changed

+30
-23
lines changed

‎src/backend/commands/explain_dr.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
*/
1414
#include"postgres.h"
1515

16+
#include"commands/explain.h"
1617
#include"commands/explain_dr.h"
1718
#include"libpq/pqformat.h"
1819
#include"libpq/protocol.h"

‎src/backend/tcop/dest.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
#include"access/xact.h"
3434
#include"commands/copy.h"
3535
#include"commands/createas.h"
36-
#include"commands/explain.h"
36+
#include"commands/explain_dr.h"
3737
#include"commands/matview.h"
3838
#include"executor/functions.h"
3939
#include"executor/tqueue.h"

‎src/include/commands/explain.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,4 @@ extern void ExplainPrintJITSummary(ExplainState *es, QueryDesc *queryDesc);
120120
externvoidExplainQueryText(ExplainState*es,QueryDesc*queryDesc);
121121
externvoidExplainQueryParameters(ExplainState*es,ParamListInfoparams,intmaxlen);
122122

123-
externDestReceiver*CreateExplainSerializeDestReceiver(ExplainState*es);
124-
125123
#endif/* EXPLAIN_H */

‎src/include/commands/explain_dr.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@
1313
#ifndefEXPLAIN_DR_H
1414
#defineEXPLAIN_DR_H
1515

16-
#include"commands/explain.h"
1716
#include"executor/instrument.h"
17+
#include"tcop/dest.h"
18+
19+
structExplainState;/* avoid including explain.h here */
1820

1921
/* Instrumentation data for EXPLAIN's SERIALIZE option */
2022
typedefstructSerializeMetrics
@@ -24,7 +26,7 @@ typedef struct SerializeMetrics
2426
BufferUsagebufferUsage;/* buffers accessed during serialization */
2527
}SerializeMetrics;
2628

27-
externDestReceiver*CreateExplainSerializeDestReceiver(ExplainState*es);
29+
externDestReceiver*CreateExplainSerializeDestReceiver(structExplainState*es);
2830
externSerializeMetricsGetSerializationMetrics(DestReceiver*dest);
2931

3032
#endif

‎src/include/commands/explain_format.h

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,40 +13,46 @@
1313
#ifndefEXPLAIN_FORMAT_H
1414
#defineEXPLAIN_FORMAT_H
1515

16-
#include"commands/explain.h"
16+
#include"nodes/pg_list.h"
17+
18+
structExplainState;/* avoid including explain.h here */
1719

1820
externvoidExplainPropertyList(constchar*qlabel,List*data,
19-
ExplainState*es);
21+
structExplainState*es);
2022
externvoidExplainPropertyListNested(constchar*qlabel,List*data,
21-
ExplainState*es);
23+
structExplainState*es);
2224
externvoidExplainPropertyText(constchar*qlabel,constchar*value,
23-
ExplainState*es);
25+
structExplainState*es);
2426
externvoidExplainPropertyInteger(constchar*qlabel,constchar*unit,
25-
int64value,ExplainState*es);
27+
int64value,structExplainState*es);
2628
externvoidExplainPropertyUInteger(constchar*qlabel,constchar*unit,
27-
uint64value,ExplainState*es);
29+
uint64value,structExplainState*es);
2830
externvoidExplainPropertyFloat(constchar*qlabel,constchar*unit,
29-
doublevalue,intndigits,ExplainState*es);
31+
doublevalue,intndigits,
32+
structExplainState*es);
3033
externvoidExplainPropertyBool(constchar*qlabel,boolvalue,
31-
ExplainState*es);
34+
structExplainState*es);
3235

3336
externvoidExplainOpenGroup(constchar*objtype,constchar*labelname,
34-
boollabeled,ExplainState*es);
37+
boollabeled,structExplainState*es);
3538
externvoidExplainCloseGroup(constchar*objtype,constchar*labelname,
36-
boollabeled,ExplainState*es);
39+
boollabeled,structExplainState*es);
3740

3841
externvoidExplainOpenSetAsideGroup(constchar*objtype,constchar*labelname,
39-
boollabeled,intdepth,ExplainState*es);
40-
externvoidExplainSaveGroup(ExplainState*es,intdepth,int*state_save);
41-
externvoidExplainRestoreGroup(ExplainState*es,intdepth,int*state_save);
42+
boollabeled,intdepth,
43+
structExplainState*es);
44+
externvoidExplainSaveGroup(structExplainState*es,intdepth,
45+
int*state_save);
46+
externvoidExplainRestoreGroup(structExplainState*es,intdepth,
47+
int*state_save);
4248

4349
externvoidExplainDummyGroup(constchar*objtype,constchar*labelname,
44-
ExplainState*es);
50+
structExplainState*es);
4551

46-
externvoidExplainBeginOutput(ExplainState*es);
47-
externvoidExplainEndOutput(ExplainState*es);
48-
externvoidExplainSeparatePlans(ExplainState*es);
52+
externvoidExplainBeginOutput(structExplainState*es);
53+
externvoidExplainEndOutput(structExplainState*es);
54+
externvoidExplainSeparatePlans(structExplainState*es);
4955

50-
externvoidExplainIndentText(ExplainState*es);
56+
externvoidExplainIndentText(structExplainState*es);
5157

5258
#endif

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp