From 1eed57310a93f8f5a6fdc80e70d576dca898cb48 Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Wed, 9 Jun 2021 03:31:41 -0700 Subject: [PATCH] Use DBL_MAX for cost --- src/ivfflat.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ivfflat.c b/src/ivfflat.c index 29b8248..40442f9 100644 --- a/src/ivfflat.c +++ b/src/ivfflat.c @@ -1,5 +1,7 @@ #include "postgres.h" +#include + #include "access/amapi.h" #include "commands/vacuum.h" #include "ivfflat.h" @@ -54,8 +56,8 @@ ivfflatcostestimate(PlannerInfo *root, IndexPath *path, double loop_count, /* Never use index without order */ if (path->indexorderbys == NULL) { - *indexStartupCost = 1.0e10; - *indexTotalCost = 1.0e10; + *indexStartupCost = DBL_MAX; + *indexTotalCost = DBL_MAX; *indexSelectivity = 0; *indexCorrelation = 0; #if PG_VERSION_NUM >= 100000