Re: Int8 problem

From: "admin" <admin(at)mmelectrica(dot)ro>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Int8 problem
Date: 2000-09-27 08:18:25
Message-ID: 004801c0285b$823329e0$1001a8c0@mmelectrica.ro
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Tom your right.
I take a detailed look at it and it fails exactly at 2^31 .
2^31-1 = 2147483647 --> 2147483647
2^31 = 2147483648 --> -2147483648
2^31+1= 2147483649 --> -2147483647
.....
10^10 --> 1410065408
10^12 --> -727379968
...
But how could i compile the int8 corectly?

- Original Message -----
From: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "admin" <admin(at)mmelectrica(dot)ro>
Cc: "Jerome Raupach" <jraupach(at)intelcom(dot)fr>; <pgsql-general(at)postgresql(dot)org>
Sent: 27 septembrie 2000 08:43
Subject: Re: [GENERAL] Int8 problem

> "admin" <admin(at)mmelectrica(dot)ro> writes:
> > But on the alpha i got no error message no worning and inserts a wrong
> > number if the number is bigger than 10^13 .
>
> 10^13? But values > 2^31 work? Man, that's really weird ... I was
> expecting a failure at 2^31 if int8 wasn't compiled correctly.
> I can't think what might fail at 10^13. Ideas anyone?
>
> It might help to see an exact table of equivalences, ie, so much
> in, so much out.
>
> regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Manfred Pock 2000-09-27 08:23:24 Postgresql 7.0.2 under WinNT
Previous Message Bob Zatolokin 2000-09-27 07:45:33 The best table's scheme?