Re: clamp_row_est avoid infinite - Mailing list pgsql-hackers

From Tom Lane
Subject Re: clamp_row_est avoid infinite
Date
Msg-id 3228866.1713844467@sss.pgh.pa.us
Whole thread Raw
In response to clamp_row_est avoid infinite  (jian he <jian.universality@gmail.com>)
List pgsql-hackers
jian he <jian.universality@gmail.com> writes:
> if (nrows > MAXIMUM_ROWCOUNT || isnan(nrows))
>     nrows = MAXIMUM_ROWCOUNT;
> else if (nrows <= 1.0)
>     nrows = 1.0;
> else
>     nrows = rint(nrows);

> The comments say `Avoid infinite and NaN`
> but actually we only avoid NaN.

Really?  The IEEE float arithmetic standard says that Inf is
greater than any finite value, and in particular it'd be
greater than MAXIMUM_ROWCOUNT.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Statistics Import and Export
Next
From: "Imseih (AWS), Sami"
Date:
Subject: Re: query_id, pg_stat_activity, extended query protocol