[HACKERS] int8 INT64_IS_BUSTED

2007-08-29 Thread Florian G. Pflug
Hi I'm confused about whether int8s work on a machine on which INT64_IS_BUSTED. My reading of the code suggests that int8 will be available, but be, well, busted in such a machine. For example, int8mul seems as if I'd just return the wrong answer on such a machine. Or are platforms with

Re: [HACKERS] int8 INT64_IS_BUSTED

2007-08-29 Thread Neil Conway
On Wed, 2007-08-29 at 22:41 +0200, Florian G. Pflug wrote: Or are platforms with INT64_IS_BUSTED no longer supported, and are all those #ifdefs only legacy code? Personally I think we should head in that direction: if we enable integer datetimes by default in 8.4 (per earlier discussion), such

Re: [HACKERS] int8 INT64_IS_BUSTED

2007-08-29 Thread Tom Lane
Florian G. Pflug [EMAIL PROTECTED] writes: I'm confused about whether int8s work on a machine on which INT64_IS_BUSTED. My reading of the code suggests that int8 will be available, but be, well, busted in such a machine. The datatype exists, but it's really only int32. For example, int8mul

Re: [HACKERS] int8 INT64_IS_BUSTED

2007-08-29 Thread Florian G. Pflug
Tom Lane wrote: Florian G. Pflug [EMAIL PROTECTED] writes: I'm confused about whether int8s work on a machine on which INT64_IS_BUSTED. My reading of the code suggests that int8 will be available, but be, well, busted in such a machine. The datatype exists, but it's really only int32. For

Re: [HACKERS] int8 INT64_IS_BUSTED

2007-08-29 Thread Tom Lane
Florian G. Pflug [EMAIL PROTECTED] writes: I still think int8mul is buggy. It calculates result as arg1 * arg2, and then checks for an overflow by dividing again, and seeing if the right answer comes out. Which sounds good. But it *skips* that check if both arguments fit into an int32 - check