About PostgreSQL's limit on arithmetic operations - Mailing list pgsql-general

From Devrim GUNDUZ
Subject About PostgreSQL's limit on arithmetic operations
Date
Msg-id Pine.LNX.4.61.0409291030420.21620@emo.org.tr
Whole thread Raw
Responses Re: About PostgreSQL's limit on arithmetic operations  (Shridhar Daithankar <shridhar@frodo.hserus.net>)
Re: About PostgreSQL's limit on arithmetic operations  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
List pgsql-general
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Hi,

We were performing some tests on PostgreSQL and found that it fails on the
following query:

SELECT 512*18014398509481984 AS result;

and the result is:

         result
- ----------------------
  -9223372036854775808

It should be 9223372036854775808... This is PostgreSQL 7.4.5 on Fedora
Core 2.

We tested the same query on some other database servers:

Oracle 9 ias r2 : 9,22337203685478E18
Oracle 9i WinXP, 32 bit : 9223372036854775808
Oracle 9.2.0.3 on  Redhat 9 : 9223372036854775808
Oracle 9.2.0.3 on Redhat Advanced Server 2.1 : 9223372036854775808
MS-SQL Server 2000 : 9223372036854775808
MySQL on Sun Solaris 6 : -9223372036854775808
MySQL on Red Hat Enterprise Linux 3.0 : -9223372036854775808

It seems that MySQL and PostgreSQL fails on this query. Is this a bug, or
a lack of something?

... or is there a limit?

Regards,
- --
Devrim GUNDUZ
devrim~gunduz.org                devrim.gunduz~linux.org.tr
             http://www.tdmsoft.com
             http://www.gunduz.org

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQFBWmc4tl86P3SPfQ4RAliCAJ9JJA3111mxrcBnnWptI8cTQzdpoQCgsBQV
HMKeNGowkd35BhMwW6kWwbs=
=BWS3
-----END PGP SIGNATURE-----

pgsql-general by date:

Previous
From: Michael Mallete
Date:
Subject: error: unicode characters greater than or equal to 0x10000
Next
From: Shridhar Daithankar
Date:
Subject: Re: About PostgreSQL's limit on arithmetic operations