Control the precision of numbers #1082
-
I have a number -2.605 in the database that is displayed as -2.60499999999999998 through ldproxy (FLOAT). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Suggested solution: |
Beta Was this translation helpful? Give feedback.
Suggested solution:
Although decimal numbers look fine in postgres with the correct number of decimals, the numbers are displayed via ldproxy with a lot more decimals. The solution seems to be to define the column as numeric(x, y) - for example numeric (10, 3). In this way, the number is rounded to 3 decimal places in the database and displayed correctly in ldproxy.