ClickHouse / clickhouse-jdbc-bridge

A JDBC proxy from ClickHouse to external databases
Apache License 2.0
167 stars 60 forks source link

PostgreSQL numeric (without precision) #160

Open UnamedRus opened 1 year ago

UnamedRus commented 1 year ago

From PostgreSQL docs:

without any precision or scale creates an “unconstrained numeric” column in which numeric values of any length can be
stored, up to the implementation limits. A column of this kind will not coerce input values to any particular scale, whereas 
numeric columns with a declared scale will coerce input values to that scale. (The SQL standard requires a default scale 
of 0, i.e., coercion to integer precision. We find this a bit useless. If you're concerned about portability, always specify the 
precision and scale explicitly.)

Basically it does mean that ClickHouse or jdbc bridge will throw away decimal part of numeric column