Wrong numeric value displayed in Grid but correct in Text output
See original GitHub issueDescription
When I select a column of data type REAL
(float4
) in Postgres, I get to see a value in the Grid output that is not the correct value from the database. It appears as if the value has been rounded and several fractions have been added:
When checking the Text output, the value is displayed correctly:
Interestingly, the same value is present in the Grid when I double-click into the value:
–> double click:
DBeaver Version
Community Edition Version 22.2.5.202211202223
Operating System
macOS Ventura 13.0.1
Database and driver
- Database name and version: PostgreSQL 15.0 (Debian 15.0-1.pgdg110+1) on aarch64-unknown-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
- Database driver: standard Postgres driver as downloaded from DBeaver:
Steps to reproduce
CREATE TABLE foo (test real);
INSERT INTO foo VALUES (617.6);
SELECT * FROM foo;
Additional context
No response
Issue Analytics
- State:
- Created 10 months ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Show Values field in Text field output, with correct number ...
The logic part is of no issue, but i am having trouble with the Values fields. The output i am looking to create...
Read more >free-jqGrid - The numeric value is displayed instead of the text ...
When i am in edit, they are displayed correctly but after the row gets saved the dynamicly filled select displays the numeric value...
Read more >GetCellDisplayText method returning wrong output
Hi DevExpress,. I am trying to catch current Display Text in GridControl's cell using GetCellDisplayText method. Here for numeric column i ...
Read more >Format a number or currency field - Microsoft Support
When the field contains a value of zero, 0,000.00 is displayed. To display text instead of a number, use "Zero" (surrounded by double...
Read more >7 Ways to Convert Text to Numbers in Microsoft Excel
Even though the data looks like a number, it can actually be a text value and ... Any cells that are flagged with...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
PostgreSQL returns a result set with a single column whose type has no bounds on its precision. When DBeaver displays its value, it checks its precision and formats it accordingly by exposing all these weird digits thanks to the rounding errors.
It looks like the editor, when opened, receives another value that wasn’t formatted. Perhaps we need to look into that.
Given that the right value is there when you double-click on it, I think it’s more like DBeaver works… 😃 I appreciate that it takes the value and converts it into a float for display, but the correct value is there in the grid. I just can’t see why you would run through the conversion at that stage but then again, I don’t know what the option is really good for, to begin with. Anyway, thanks again!