Re: numeric field overflow

Поиск
Список
Период
Сортировка
От Christophe Pettus
Тема Re: numeric field overflow
Дата
Msg-id D929343B-E526-4999-871E-EE2B89F5236B@thebuild.com
обсуждение исходный текст
Ответ на numeric field overflow  (Nurzhan Kirbassov <km.sameboy@gmail.com>)
Список pgsql-general
On Oct 5, 2009, at 11:20 PM, Nurzhan Kirbassov wrote:
> So, does the precision part of the numeric type really means number of
> digits to the left of the decimal point, or what ?


NUMERIC is behaving as documented.  The way to think of it is when you
are inserting:

    INSERT INTO test.test VALUES (10000)

into a NUMERIC(5,1), what you are doing is inserting:

    INSERT INTO test.test VALUES (10000.0)

10000.0 has six significant digits, rather than five, so the insert
fails.
--
-- Christophe Pettus
    xof@thebuild.com


В списке pgsql-general по дате отправления:

Предыдущее
От: Nurzhan Kirbassov
Дата:
Сообщение: numeric field overflow
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: numeric field overflow