Re: Different exponent in error messages

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: Different exponent in error messages
Дата
Msg-id 20060111223431.GA88428@winnie.fuhr.org
обсуждение исходный текст
Ответ на Re: Different exponent in error messages  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Different exponent in error messages  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Wed, Jan 11, 2006 at 04:09:23PM -0500, Tom Lane wrote:
> "Andrus" <eetasoft@online.ee> writes:
> > Why Postgres 8.1.1 in XP returns different exponents ( 10^6, 10^9, 10^7) for
> > field with precision 9, scale 3 ?
>
> Could we see a complete test case --- ie, what are the input values
> causing these messages?

I think this is what Andrus is seeing:

test=> CREATE TABLE foo (n numeric(9,3));
CREATE TABLE
test=> INSERT INTO foo VALUES (1000000);
ERROR:  numeric field overflow
DETAIL:  The absolute value is greater than or equal to 10^6 for field with precision 9, scale 3.
test=> INSERT INTO foo VALUES (1000000000);
ERROR:  numeric field overflow
DETAIL:  The absolute value is greater than or equal to 10^9 for field with precision 9, scale 3.
test=> INSERT INTO foo VALUES (10000000);
ERROR:  numeric field overflow
DETAIL:  The absolute value is greater than or equal to 10^7 for field with precision 9, scale 3.

--
Michael Fuhr

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

Предыдущее
От: "Guy Rouillier"
Дата:
Сообщение: Re: Create Produre for DROP row
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Different exponent in error messages