pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas O'Connell <tfo@monsterlabs.com>
To: pgsql-general@postgresql.org
To: pgsql-sql@postgresql.org
Subject: double precision to numeric overflow error
Date: Tue, 07 Jan 2003 17:12:08 -0600
Message-ID: <tfo-DC0904.17120807012003@news.hub.org> (raw)

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



view thread (6+ messages)  latest in thread

Message-ID: <tfo-DC0904.17120807012003@news.hub.org>
Permalink:  ../tfo-DC0904.17120807012003@news.hub.org/
Also on:    postgresql.org/message-id/tfo-DC0904.17120807012003@news.hub.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tfo@monsterlabs.com, pgsql-general@postgresql.org
  Subject: Re: double precision to numeric overflow error
  In-Reply-To: <tfo-DC0904.17120807012003@news.hub.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox