double precision to numeric overflow error

Поиск
Список
Период
Сортировка
От Thomas O'Connell
Тема double precision to numeric overflow error
Дата
Msg-id tfo-DC0904.17120807012003@news.hub.org
обсуждение исходный текст
Ответы Re: [SQL] double precision to numeric overflow error  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Список pgsql-general
is this expected behavior? if so, then why?

-tfo

db=# create table foo( col timestamp );
db=# select cast( extract( epoch from col ) as numeric( 15, 6 ) ) from
foo;
 date_part
-----------
(0 rows)
db=# insert into foo values( current_timestamp );
INSERT 1705954 1
db=# select cast( extract( epoch from col ) as numeric( 15, 6 ) ) from
foo;
ERROR:  overflow on numeric ABS(value) >= 10^9 for field with precision
15 scale 6

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

Предыдущее
От: "Dann Corbit"
Дата:
Сообщение: Re: [HACKERS] I feel the need for speed. What am I doing wrong?
Следующее
От: "scott.marlowe"
Дата:
Сообщение: Re: [PERFORM] PostgreSQL and memory usage