In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-08 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces the knowledge of "what is the difference between the digital output of PostgreSQL 11 and PostgreSQL 12". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Floating-point numbers in versions prior to PostgreSQL 12 are output by rounding to a specific number, controlled by the parameter extra_float_digits. The output speed of this method is slow when querying large tables with real or double precision columns. In PG12, the decimal representation output is the shortest output that is re-entered as an exact original binary value.
PG 11
Testdb=# SET extra_float_digits = 3 row time: 1.141 mstestdb=# select 0.03 float8 float8-0.029999999999999999999999999999989 (1 SETTime): 3.116 mstestdb=#
Calculate inexhaustible decimals, and the output is also different.
Testdb=# select 1Acer 3 Time float;? column?-0.3333333333333315 (1 row) mstestdb=#
PG 12
Select 0.03::float
[local]: 5432 pg12@testdb=# SET extra_float_digits = 3 local SETTime: 0.646 ms [local]: 5432 pg12@testdb=# select 0.03 local; float8-0.03 (1 row) Time: 0.611 ms [local]: 5432 pg12@testdb=#
Select 1/3::float
[local]: 5432 pg12@testdb=# select 1 Accord 3 row float;? column?-0.3333333333333333 (1 row) Time: 1.986 ms [local]: 5432 pg12@testdb=# "what's the difference between the digital output of PostgreSQL 11 and PostgreSQL 12". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.