Closed subkanthi closed 1 month ago
PostgreSQL documentation
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.)
numeric
datatype with default scale, precision mapped to Decimal(64, 18) in ClickHouse.
numeric
datatype with explicit scale precision should passed to Clickhouse.
Example.
numeric(21,5) -> numeric(21, 5)
in ClickHouse.
Implemeted in #715.
numeric datatype in postgres mapped to Decimal(10,2) in ClickHouse, the precision should not be 2 and it should be higher.