double precision to numeric overflow error - Mailing list pgsql-general

From Thomas O'Connell
Subject double precision to numeric overflow error
Date
Msg-id tfo-DC0904.17120807012003@news.hub.org
Whole thread Raw
Responses Re: [SQL] double precision to numeric overflow error
List 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 by date:

Previous
From: "Dann Corbit"
Date:
Subject: Re: [HACKERS] I feel the need for speed. What am I doing wrong?
Next
From: "scott.marlowe"
Date:
Subject: Re: [PERFORM] PostgreSQL and memory usage