@@ -213,8 +213,7 @@ pathman_join_pathlist_hook(PlannerInfo *root,
213
213
have_dangerous_phv (root , outer -> parent -> relids , required_inner )))
214
214
return ;
215
215
216
- initial_cost_nestloop_compat (root , & workspace , jointype , outer , inner ,
217
- extra );
216
+ initial_cost_nestloop_compat (root , & workspace , jointype , outer , inner , extra );
218
217
219
218
pathkeys = build_join_pathkeys (root , joinrel , jointype , outer -> pathkeys );
220
219
@@ -771,6 +770,7 @@ pathman_relcache_hook(Datum arg, Oid relid)
771
770
772
771
/*
773
772
* Utility function invoker hook.
773
+ * NOTE: 'first_arg' is (PlannedStmt *) in PG 10, or (Node *) in PG <= 9.6.
774
774
*/
775
775
void
776
776
#if PG_VERSION_NUM >= 100000
@@ -781,9 +781,9 @@ pathman_process_utility_hook(PlannedStmt *first_arg,
781
781
QueryEnvironment * queryEnv ,
782
782
DestReceiver * dest , char * completionTag )
783
783
{
784
- Node * parsetree = first_arg -> utilityStmt ;
785
- int stmt_location = first_arg -> stmt_location ,
786
- stmt_len = first_arg -> stmt_len ;
784
+ Node * parsetree = first_arg -> utilityStmt ;
785
+ int stmt_location = first_arg -> stmt_location ,
786
+ stmt_len = first_arg -> stmt_len ;
787
787
#else
788
788
pathman_process_utility_hook (Node * first_arg ,
789
789
const char * queryString ,
@@ -792,9 +792,9 @@ pathman_process_utility_hook(Node *first_arg,
792
792
DestReceiver * dest ,
793
793
char * completionTag )
794
794
{
795
- Node * parsetree = first_arg ;
796
- int stmt_location = -1 ,
797
- stmt_len = 0 ;
795
+ Node * parsetree = first_arg ;
796
+ int stmt_location = -1 ,
797
+ stmt_len = 0 ;
798
798
#endif
799
799
800
800
if (IsPathmanReady ())
@@ -809,8 +809,8 @@ pathman_process_utility_hook(Node *first_arg,
809
809
uint64 processed ;
810
810
811
811
/* Handle our COPY case (and show a special cmd name) */
812
- PathmanDoCopy ((CopyStmt * ) parsetree , queryString , stmt_location ,
813
- stmt_len , & processed );
812
+ PathmanDoCopy ((CopyStmt * ) parsetree , queryString ,
813
+ stmt_location , stmt_len , & processed );
814
814
if (completionTag )
815
815
snprintf (completionTag , COMPLETION_TAG_BUFSIZE ,
816
816
"PATHMAN COPY " UINT64_FORMAT , processed );
@@ -845,9 +845,11 @@ pathman_process_utility_hook(Node *first_arg,
845
845
}
846
846
}
847
847
848
- /* 'first_arg' is PlannedStmt in pg10 or Node parsetree in pg9.6 and lower */
849
- call_process_utility_compat (
850
- (process_utility_hook_next ) ? process_utility_hook_next :
851
- standard_ProcessUtility ,
852
- first_arg , queryString , context , params , queryEnv , dest , completionTag );
848
+ /* Finally call process_utility_hook_next or standard_ProcessUtility */
849
+ call_process_utility_compat ((process_utility_hook_next ?
850
+ process_utility_hook_next :
851
+ standard_ProcessUtility ),
852
+ first_arg , queryString ,
853
+ context , params , queryEnv ,
854
+ dest , completionTag );
853
855
}
0 commit comments