Обсуждение: Max Precision/Scale of Postgres Numeric Type?

Поиск
Список
Период
Сортировка

Max Precision/Scale of Postgres Numeric Type?

От
Byron Nikolaidis
Дата:
Hi all,

I'm implementing the Postgres Numeric Type in the odbc driver, and was
wondering what the maximum precision and scale for the postgres
"numeric" type is?  It seems pretty huge -- I tried numeric(150, 100 )
with no problem!

Note, this is not the precision/scale returned in the atttypmod field
which I use for SQLColumns and SQLDescribeCol/SQLColAttributes, but for
the SQLGetTypeInfo odbc function, which needs maximums for the data type
itself.

Thanks,

Byron


Re: [INTERFACES] Max Precision/Scale of Postgres Numeric Type?

От
Tom Lane
Дата:
Byron Nikolaidis <byron.nikolaidis@home.com> writes:
> I'm implementing the Postgres Numeric Type in the odbc driver, and was
> wondering what the maximum precision and scale for the postgres
> "numeric" type is?

1000, according to src/include/utils/numeric.h.  (You could make it
even bigger by editing that file...)
        regards, tom lane