Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday, October 18, 2023, 毛毛 <krave@xxxxxxx> wrote:

I consulted the following doc and found that the range of real type is 6 decimal digits precision.
https://www.postgresql.org/docs/current/datatype-numeric.html#DATATYPE-NUMERIC

You also need to consult:

https://www.postgresql.org/docs/current/datatype-numeric.html#DATATYPE-FLOAT 

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.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux