From: | Devrim GUNDUZ <devrim(at)gunduz(dot)org> |
---|---|
To: | Shridhar Daithankar <shridhar(at)frodo(dot)hserus(dot)net> |
Cc: | Devrim GUNDUZ <devrim(at)gunduz(dot)org>, PostgreSQL Mailing Lists-General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: About PostgreSQL's limit on arithmetic operations |
Date: | 2004-09-29 08:55:45 |
Message-ID: | Pine.LNX.4.61.0409291142570.21620@emo.org.tr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
On Wed, 29 Sep 2004, Shridhar Daithankar wrote:
>>
>> 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.
>
>
> shridhar(at)ps0499:~$ psql template1
<snip>
> template1=# SELECT 512*18014398509481984::numeric(20) AS result;
> result
> ---------------------
> 9223372036854775808
> (1 row)
Ok, I got the same result in 7.4.5... But... Why do we have to cast it
into numeric? The results from other databases shows that they can perform
it without casting...
Anyway, thanks for the tip.
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)
iD8DBQFBWniTtl86P3SPfQ4RAt9/AJ0dG8bXaDVgqAvtgIDiEAX7MwU4YACfeR+l
c4nhYwft3NvJWhOdHJ90Lm8=
=4uVc
-----END PGP SIGNATURE-----
From | Date | Subject | |
---|---|---|---|
Next Message | Marian POPESCU | 2004-09-29 08:59:28 | Re: PostgreSQL 8.0.0 Beta 3 Uploaded |
Previous Message | tsarevich | 2004-09-29 08:54:47 | Re: Syntax Issue in Trigger Function?? |