Skip site navigation (1) Skip section navigation (2)

Silent int overflow

From: "Jim C(dot) Nasby" <jim(at)nasby(dot)net>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Silent int overflow
Date: 2004-04-27 23:30:04
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
stats=# select 10000*1000000000, 10000*1000000000::bigint;
  ?column?  |    ?column?    
 1316134912 | 10000000000000
(1 row)

Shouldn't the first expression throw an error instead of rolling over

Version 7.4.2 if it matters...
Jim C. Nasby, Database Consultant                  jim(at)nasby(dot)net
Member: Triangle Fraternity, Sports Car Club of America
Give your computer some brain candy! Team #1828

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"

pgsql-bugs by date

Next:From: Ruslan A DautkhanovDate: 2004-04-28 01:51:59
Subject: Multi-process transactions [share connections]
Previous:From: PostgreSQL Bugs ListDate: 2004-04-27 19:32:40
Subject: BUG #1144: comments don't get propagated

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group