You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I insert a DECIMAL or FLOAT of a higher precision than the column supports - PSQL/MySQL rounds it before saving.
DuckDB truncates. Which makes it an outlier.
To test in PSQL:
CREATE TABLE qwe (
id serial PRIMARY KEY,
dec decimal(10,3) NOT NULL,
fl NUMERIC ( 10,3 ) NOT NULL
)
INSERT INTO qwe(dec,fl) VALUES (20.999999,5.99999999),(5.123123,5.123123123),
SELECT * FROM qwe
To Reproduce
CREATE TABLE test(
dec DECIMAL(5,3)
)
INSERT INTO test VALUES (2.99999),(3.123), (8.8976553)
SELECT * FROM test
OS:
linux
DuckDB Version:
5.0.2
DuckDB Client:
Python
Full Name:
Igor
Affiliation:
none.
Have you tried this on the latest master branch?
I agree
Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?