From 2832e746f0ab76651b07d07c38353d51b9bd915e Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Thu, 10 Oct 2024 18:16:39 -0700 Subject: [PATCH] Use get_float8_infinity instead of INFINITY Co-authored-by: "Jonathan S. Katz" --- src/hnswscan.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/hnswscan.c b/src/hnswscan.c index 3a5c5d5..b473e2b 100644 --- a/src/hnswscan.c +++ b/src/hnswscan.c @@ -1,12 +1,11 @@ #include "postgres.h" -#include - #include "access/relscan.h" #include "hnsw.h" #include "pgstat.h" #include "storage/bufmgr.h" #include "storage/lmgr.h" +#include "utils/float.h" #include "utils/memutils.h" /* @@ -147,7 +146,7 @@ hnswrescan(IndexScanDesc scan, ScanKey keys, int nkeys, ScanKey orderbys, int no so->first = true; so->tuples = 0; - so->previousDistance = -INFINITY; + so->previousDistance = -get_float8_infinity(); MemoryContextReset(so->tmpCtx); if (keys && scan->numberOfKeys > 0)