@@ -613,27 +613,28 @@ pathman_process_utility_hook(Node *parsetree,
613
613
DestReceiver * dest ,
614
614
char * completionTag )
615
615
{
616
- /* Call hooks set by other extensions */
617
- if (process_utility_hook_next )
618
- process_utility_hook_next (parsetree ,queryString ,
619
- context ,params ,
620
- dest ,completionTag );
621
-
622
616
/* Override standard COPY statement if needed */
623
617
if (IsPathmanReady ()&& is_pathman_related_copy (parsetree ))
624
618
{
625
619
uint64 processed ;
626
620
621
+ /* Handle our COPY case (and show a special cmd name) */
627
622
PathmanDoCopy ((CopyStmt * )parsetree ,queryString ,& processed );
628
623
if (completionTag )
629
624
snprintf (completionTag ,COMPLETION_TAG_BUFSIZE ,
630
625
"PATHMAN COPY " UINT64_FORMAT ,processed );
631
626
632
- return ;/* don't call standard_ProcessUtility() */
627
+ return ;/* don't call standard_ProcessUtility()or hooks */
633
628
}
634
629
635
- /* Call internal implementation */
636
- standard_ProcessUtility (parsetree ,queryString ,
637
- context ,params ,
638
- dest ,completionTag );
630
+ /* Call hooks set by other extensions if needed */
631
+ if (process_utility_hook_next )
632
+ process_utility_hook_next (parsetree ,queryString ,
633
+ context ,params ,
634
+ dest ,completionTag );
635
+ /* Else call internal implementation */
636
+ else
637
+ standard_ProcessUtility (parsetree ,queryString ,
638
+ context ,params ,
639
+ dest ,completionTag );
639
640
}