CREATE TABLE IF NOT EXISTS ttable (
tcol decimal(9,7)
);
insert into ttable(tcol) values(17.4604786);
the value is getting stored as 17.46
Happens the same if I use decimal/numeric type
I am using
PostgreSQL 11.2 on x86_64-apple-darwin16.7.0, compiled by Apple LLVM version 8.1.0 (clang-802.0.42), 64-bit.
Tool
SQL Workbench/J Build 124 (2018-08-20 22:43)
Java version: 1.8.0_211 (64 bit).
Connection info:
Product Name: PostgreSQL
Product Version: 11.2
Product Info: 11.2
Driver Name: PostgreSQL JDBC Driver
Driver Class: org.postgresql.Driver
Driver Version: 42.2.6
Isolation Level: READ COMMITTED
Workbench DBID: postgresql