We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent65c5fcd commit49b4950Copy full SHA for 49b4950
src/backend/optimizer/path/costsize.c
@@ -419,9 +419,10 @@ cost_index(IndexPath *path, PlannerInfo *root, double loop_count)
419
* Call index-access-method-specific code to estimate the processing cost
420
* for scanning the index, as well as the selectivity of the index (ie,
421
* the fraction of main-table tuples we will have to retrieve) and its
422
- * correlation to the main-table tuple order.
+ * correlation to the main-table tuple order. We need a cast here because
423
+ * relation.h uses a weak function type to avoid including amapi.h.
424
*/
-amcostestimate=index->amcostestimate;/* cast to proper type */
425
+amcostestimate=(amcostestimate_function)index->amcostestimate;
426
amcostestimate(root,path,loop_count,
427
&indexStartupCost,&indexTotalCost,
428
&indexSelectivity,&indexCorrelation);