Re: How can I accurately infer the output of a SELECT statement FROM a table with floating-point data type? - Mailing list pgsql-general

From David G. Johnston
Subject Re: How can I accurately infer the output of a SELECT statement FROM a table with floating-point data type?
Date
Msg-id CAKFQuwb7Dbsm-hDmJzCJ+ApipD7p-wqRunY5yqVCEq3AjYsxpA@mail.gmail.com
Whole thread Raw
In response to How can I accurately infer the output of a SELECT statement FROM a table with floating-point data type?  (毛毛 <krave@163.com>)
List pgsql-general
On Wednesday, October 18, 2023, 毛毛 <krave@163.com> wrote:

I consulted the following doc and found that the range of real type is 6 decimal digits precision.

You also need to consult:


But in short, no, the result is input specific and you the user are not expected to know or care about such details.  The docs say you will get between 6 and 9 digits depending on the value, under default settings.  The table gives the minimum as clarified in the prose.  There is room in the table to include more detail and it probably should.

David J.

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: How can I accurately infer the output of a SELECT statement FROM a table with floating-point data type?
Next
From: Sebastien Flaesch
Date:
Subject: Build fails on RHEL 8.8 about libxml2 version