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: 20040427233004.GS41429@nasby.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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
silently?

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! www.distributed.net 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?"

Browse pgsql-bugs by date

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