@@ -147,7 +147,8 @@ pathman_join_pathlist_hook(PlannerInfo *root,
147
147
if (saved_jointype == JOIN_UNIQUE_INNER )
148
148
return ;/* No way to do this with a parameterized inner path */
149
149
150
- #if definedPGPRO_VERSION && PG_VERSION_NUM >=90603
150
+ /* TODO: create macro initial_cost_nestloop_compat() */
151
+ #if defined(PGPRO_VERSION )&& PG_VERSION_NUM >=90603
151
152
initial_cost_nestloop (root ,& workspace ,jointype ,
152
153
outer ,inner ,/* built paths */
153
154
extra );
@@ -159,20 +160,6 @@ pathman_join_pathlist_hook(PlannerInfo *root,
159
160
160
161
pathkeys = build_join_pathkeys (root ,joinrel ,jointype ,outer -> pathkeys );
161
162
162
- #if definedPGPRO_VERSION && PG_VERSION_NUM >=90603
163
- nest_path = create_nestloop_path (root ,joinrel ,jointype ,& workspace ,
164
- extra ,outer ,inner ,
165
- extra -> restrictlist ,
166
- pathkeys ,
167
- calc_nestloop_required_outer (outer ,inner ));
168
- #else
169
- nest_path = create_nestloop_path (root ,joinrel ,jointype ,& workspace ,
170
- extra -> sjinfo ,& extra -> semifactors ,
171
- outer ,inner ,extra -> restrictlist ,
172
- pathkeys ,
173
- calc_nestloop_required_outer (outer ,inner ));
174
- #endif
175
-
176
163
/* Discard all clauses that are to be evaluated by 'inner' */
177
164
foreach (rinfo_lc ,extra -> restrictlist )
178
165
{
@@ -183,6 +170,24 @@ pathman_join_pathlist_hook(PlannerInfo *root,
183
170
filtered_joinclauses = lappend (filtered_joinclauses ,rinfo );
184
171
}
185
172
173
+ /* TODO: create macro create_nestloop_path_compat() */
174
+ #if defined(PGPRO_VERSION )&& PG_VERSION_NUM >=90603
175
+ nest_path = create_nestloop_path (root ,joinrel ,jointype ,& workspace ,
176
+ extra ,
177
+ outer ,inner ,
178
+ filtered_joinclauses ,
179
+ pathkeys ,
180
+ calc_nestloop_required_outer (outer ,inner ));
181
+ #else
182
+ nest_path = create_nestloop_path (root ,joinrel ,jointype ,& workspace ,
183
+ extra -> sjinfo ,
184
+ & extra -> semifactors ,
185
+ outer ,inner ,
186
+ filtered_joinclauses ,
187
+ pathkeys ,
188
+ calc_nestloop_required_outer (outer ,inner ));
189
+ #endif
190
+
186
191
/*
187
192
* Override 'rows' value produced by standard estimator.
188
193
* Currently we use get_parameterized_joinrel_size() since