question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Float values rounded up to 3 fractional digits when editing cell values

See original GitHub issue

I have a PostgreSQL table with following definition:

CREATE TABLE public.partners (
	id serial NOT NULL,
	created_at timestamp NULL,
	updated_at timestamp NULL,
	"name" varchar(250) NOT NULL,
	website varchar(250) NULL,
	phone varchar(250) NULL,
	address text NULL,
	x float8 NULL,
	y float8 NULL,
	city varchar(100) NULL,
	CONSTRAINT partners_pkey PRIMARY KEY (id)
);

I opened this table in DBeaver and swithed to the “Data” tab. Then I tried to edit values in cells “x” or “y” and got “73.394” instead of original value “73.394236” after switching to edit by double click on table cell.

I checked Settings > Databases > Editors > Data editor > Data formats, and “Maximum fractional digits” was set to “10”.

Operation system: Windows 10 Pro x64 DBeaver version: 6.1.4.201908041900 Database: PostgreSQL 11.4 (Debian 11.4-1.pgdg90+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516, 64-bit Driver: PostgreSQL JDBC Driver Connection: local

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
serge-ridercommented, Aug 13, 2019

this can be reproduced by executing simple query “SELECT 73.394236”

This can be fixed by setting “rounding mode” parameter to “UNNECESSARY” (in Data Formats settings). Probably we should set it to default (now we use default Java rounding - HALF_EVEN).

0reactions
kseniiaguzeevacommented, Aug 15, 2019

Verified

Read more comments on GitHub >

github_iconTop Results From Across the Web

Round a number to the decimal places I want - Microsoft Support
Round a number to the number of digits you want by using the ROUND function. This function has only two arguments (arguments are...
Read more >
Rounding in Power Query – The default rounding mode and ...
Let's say I have a set of numbers that I want to round to two decimal places. What is the rule that you...
Read more >
How to Change the Number of Decimal Places in Excel (Two ...
Today we're going to talk about two most common ways how to change the number of decimal places in Excel. Ready to start?...
Read more >
Excel: How to Change Decimal Places - Number Formatting
If you need to format numbers in excel to increase or decrease the number of decimal places then you can do that easily....
Read more >
c# - Limiting double to 3 decimal places - Stack Overflow
Doubles don't have decimal places - they're not based on decimal digits to start with. You could get "the closest double to the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found