Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id EAAD147653B for ; Thu, 30 May 2002 19:54:51 -0400 (EDT) Received: from ciderbox.stanaway.net (ciderbox.stanaway.net [170.76.50.98]) by postgresql.org (Postfix) with ESMTP id 7568E476525 for ; Thu, 30 May 2002 19:48:50 -0400 (EDT) Received: by ciderbox.stanaway.net (Postfix, from userid 1000) id CA520939A5; Thu, 30 May 2002 18:48:48 -0500 (CDT) Subject: Re: Math Huh? From: David Stanaway To: pgsql-sql@postgresql.org In-Reply-To: <200205301629.26161.josh@agliodbs.com> References: <200205301629.26161.josh@agliodbs.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-tv2qa4CMkwnF/XB4WBBE" X-Mailer: Ximian Evolution 1.0.5 Date: 30 May 2002 18:48:47 -0500 Message-Id: <1022802527.25795.7.camel@ciderbox> Mime-Version: 1.0 X-Archive-Number: 200205/321 X-Sequence-Number: 7956 --=-tv2qa4CMkwnF/XB4WBBE Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Thu, 2002-05-30 at 18:29, Josh Berkus wrote: > Folks, >=20 > I'll let this session speak for itself: >=20 > jwnet=3D> select version(); > version > --------------------------------------------------------------- > PostgreSQL 7.2.1 on i686-pc-linux-gnu, compiled by GCC 2.95.3 > (1 row) >=20 > jwnet=3D> select (255 * 255 * 255 * 255); > ?column? > ----------- > -66716671 > (1 row) scratch=3D# select (255 * 255 * 255 * 255::int8); ?column?=20=20 ------------ 4228250625 (1 row) $ bc -l obase=3D16 4228250625 FC05FC01 ^ You have overflowed a signed integer as the most significant bit is set. -- David Stanaway --=-tv2qa4CMkwnF/XB4WBBE Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iQEXAwUAPPa6Xr6yIDFGeSAyFALiMAP9Ew5JDVr2SKrjp0AVLtBMFYigeYkdYVK/ IrLTPKPOgdlOyIafwXmki7E8TtZEXg6TNOTJE7+kSNaDNI/TW/GY54FlPt5PLBDe AVxHYxIPyWtjL02Nh+pEob6608lX/vBtBGt8tPU0NAT5ClGWBqc7RawI56l9W8SC LX57WhT6yP8EALrjDZCmiBIVRpvBMiG7Av78U5bxFPWuJ3hKOaotQWIgyHBlbK/w ik9iUIBHQxW9vHnACPpeoHzEpHdwS+T+NSWmN/ijwWMdMzy41aSbyhoqrWAnT/Ld 8lK2m6XJyGK9icfVlIa3vPwGlh7RleycDN6031y5Vah9XxZfOBfsHGrS =WgcN -----END PGP SIGNATURE----- --=-tv2qa4CMkwnF/XB4WBBE--