@@ -217,6 +217,19 @@ pathman_join_pathlist_hook(PlannerInfo *root,
217
217
return ;
218
218
219
219
220
+ #if PG_VERSION_NUM >= 100000
221
+ initial_cost_nestloop (root , & workspace , jointype ,
222
+ outer , inner , /* built paths */
223
+ extra );
224
+
225
+ nest_path = create_nestloop_path (root , joinrel , jointype , & workspace ,
226
+ extra , outer , inner ,
227
+ extra -> restrictlist ,
228
+ build_join_pathkeys (root , joinrel ,
229
+ jointype ,
230
+ outer -> pathkeys ),
231
+ required_nestloop );
232
+ #else
220
233
initial_cost_nestloop (root , & workspace , jointype ,
221
234
outer , inner , /* built paths */
222
235
extra -> sjinfo , & extra -> semifactors );
@@ -228,6 +241,7 @@ pathman_join_pathlist_hook(PlannerInfo *root,
228
241
jointype ,
229
242
outer -> pathkeys ),
230
243
required_nestloop );
244
+ #endif
231
245
232
246
/* Discard all clauses that are to be evaluated by 'inner' */
233
247
foreach (rinfo_lc , extra -> restrictlist )
@@ -760,6 +774,17 @@ pathman_relcache_hook(Datum arg, Oid relid)
760
774
/*
761
775
* Utility function invoker hook.
762
776
*/
777
+ #if PG_VERSION_NUM >= 100000
778
+ void
779
+ pathman_process_utility_hook (PlannedStmt * pstmt ,
780
+ const char * queryString ,
781
+ ProcessUtilityContext context ,
782
+ ParamListInfo params ,
783
+ QueryEnvironment * queryEnv ,
784
+ DestReceiver * dest , char * completionTag )
785
+ {
786
+ Node * parsetree = pstmt -> utilityStmt ;
787
+ #else
763
788
void
764
789
pathman_process_utility_hook (Node * parsetree ,
765
790
const char * queryString ,
@@ -768,6 +793,8 @@ pathman_process_utility_hook(Node *parsetree,
768
793
DestReceiver * dest ,
769
794
char * completionTag )
770
795
{
796
+ #endif
797
+
771
798
if (IsPathmanReady ())
772
799
{
773
800
Oid relation_oid ;
@@ -815,6 +842,18 @@ pathman_process_utility_hook(Node *parsetree,
815
842
}
816
843
}
817
844
845
+ #if PG_VERSION_NUM >= 100000
846
+ /* Call hooks set by other extensions if needed */
847
+ if (process_utility_hook_next )
848
+ process_utility_hook_next (pstmt , queryString ,
849
+ context , params , queryEnv ,
850
+ dest , completionTag );
851
+ /* Else call internal implementation */
852
+ else
853
+ standard_ProcessUtility (pstmt , queryString ,
854
+ context , params , queryEnv ,
855
+ dest , completionTag );
856
+ #else
818
857
/* Call hooks set by other extensions if needed */
819
858
if (process_utility_hook_next )
820
859
process_utility_hook_next (parsetree , queryString ,
@@ -825,4 +864,5 @@ pathman_process_utility_hook(Node *parsetree,
825
864
standard_ProcessUtility (parsetree , queryString ,
826
865
context , params ,
827
866
dest , completionTag );
867
+ #endif
828
868
}
0 commit comments