Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit49b4950

Browse files
committed
Add explicit cast to amcostestimate call.
My compiler doesn't complain here, but David Rowley's does ...
1 parent65c5fcd commit49b4950

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎src/backend/optimizer/path/costsize.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,9 +419,10 @@ cost_index(IndexPath *path, PlannerInfo *root, double loop_count)
419419
* Call index-access-method-specific code to estimate the processing cost
420420
* for scanning the index, as well as the selectivity of the index (ie,
421421
* the fraction of main-table tuples we will have to retrieve) and its
422-
* correlation to the main-table tuple order.
422+
* 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.
423424
*/
424-
amcostestimate=index->amcostestimate;/* cast to proper type */
425+
amcostestimate=(amcostestimate_function)index->amcostestimate;
425426
amcostestimate(root,path,loop_count,
426427
&indexStartupCost,&indexTotalCost,
427428
&indexSelectivity,&indexCorrelation);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp