aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2016-01-17 22:56:16 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2016-01-17 22:56:16 -0500
commit49b49506502026a3653bca490c939dc8934afe95 (patch)
tree98987c454fc783e34e3a4b660bcf32c2ced787c3 /src
parent65c5fcd353a859da9e61bfb2b92a99f12937de3b (diff)
downloadpostgresql-49b49506502026a3653bca490c939dc8934afe95.tar.gz
postgresql-49b49506502026a3653bca490c939dc8934afe95.zip
Add explicit cast to amcostestimate call.
My compiler doesn't complain here, but David Rowley's does ...
Diffstat (limited to 'src')
-rw-r--r--src/backend/optimizer/path/costsize.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/backend/optimizer/path/costsize.c b/src/backend/optimizer/path/costsize.c
index 8fb483aaebd..eaeb17fcd41 100644
--- a/src/backend/optimizer/path/costsize.c
+++ b/src/backend/optimizer/path/costsize.c
@@ -419,9 +419,10 @@ cost_index(IndexPath *path, PlannerInfo *root, double loop_count)
* Call index-access-method-specific code to estimate the processing cost
* for scanning the index, as well as the selectivity of the index (ie,
* the fraction of main-table tuples we will have to retrieve) and its
- * correlation to the main-table tuple order.
+ * correlation to the main-table tuple order. We need a cast here because
+ * relation.h uses a weak function type to avoid including amapi.h.
*/
- amcostestimate = index->amcostestimate; /* cast to proper type */
+ amcostestimate = (amcostestimate_function) index->amcostestimate;
amcostestimate(root, path, loop_count,
&indexStartupCost, &indexTotalCost,
&indexSelectivity, &indexCorrelation);