Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 6ACC0475F49 for ; Thu, 30 May 2002 20:37:10 -0400 (EDT) Received: from lerlaptop (ppp32-41.ght.iadfw.net [207.136.52.233]) by postgresql.org (Postfix) with ESMTP id 630C2475E78 for ; Thu, 30 May 2002 20:37:08 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by lerlaptop (8.12.3/8.12.3) with ESMTP id g4V0avK0000439; Thu, 30 May 2002 19:36:58 -0500 (CDT) (envelope-from ler@lerctr.org) Subject: Re: Math Huh? From: Larry Rosenman To: josh@agliodbs.com Cc: Tom Lane , pgsql-sql@postgresql.org In-Reply-To: <200205301659.43775.josh@agliodbs.com> References: <200205301629.26161.josh@agliodbs.com> <11059.1022802214@sss.pgh.pa.us> <200205301659.43775.josh@agliodbs.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.5 Date: 30 May 2002 19:36:57 -0500 Message-Id: <1022805419.356.0.camel@lerlaptop> Mime-Version: 1.0 X-Virus-Scanned: by amavisd-milter (http://amavis.org/) X-Archive-Number: 200205/323 X-Sequence-Number: 7958 On Thu, 2002-05-30 at 18:59, Josh Berkus wrote: > > Tom, > > > (yawn) int4 overflow. Use float or numeric if you want overflow > > robustness... > > Shouldn't it give me an error? This does: > > SELECT (255^4)::INT4 Why? You're doing 3 multiplications, instead of one power. It has no idea what the number is. > > > -- > -Josh Berkus > > ______AGLIO DATABASE SOLUTIONS___________________________ > Josh Berkus > Complete information technology josh@agliodbs.com > and data management solutions (415) 565-7293 > for law firms, small businesses fax 621-2533 > and non-profit organizations. San Francisco > > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org > -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 972-414-9812 E-Mail: ler@lerctr.org US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749