Adriaan Joubert <[EMAIL PROTECTED]> writes:
> insert into lint values ('9223372036854775807'::int8);
> works, but
> insert into lint values (9223372036854775807::int8);
> doesn't.
Fixed, and checked on Debian Alpha.
regards, tom lane
---(end of
> This is a portability bug, no question. But I'd expect it to fail
> like that on all Alpha-based platforms. Adriaan, when you say it
> works on Linux, are you talking about Linux/Alpha or some other
> hardware?
No, PC Linux. I run a database on my laptop as well.
Adriaan
---
Thomas Lockhart <[EMAIL PROTECTED]> writes:
> For integers (optional sign and all digits), the code in
> src/backend/parser/scan.l uses strtol() to read the string, then checks
> for failure. If it fails, the number is interpreted as a double float on
> the assumption that if it could hold more di
> Anyway, either strtol() thinks it *should* be able to read a 64 bit
> integer, or your machine is silently overflowing. I used to have a bunch
> of these boxes, and I recall spending quite a bit of time discovering
> that Alphas have some explicit flags which can be set at compile time
> which a
> For integers (optional sign and all digits), the code in
> src/backend/parser/scan.l uses strtol() to read the string, then checks
> for failure. If it fails, the number is interpreted as a double float on
> the assumption that if it could hold more digits it would succeed!
>
> Anyway, either s
> > How are you doing the inserts? If you aren't coercing the "2" to be an
> > int8, then (afaik) the math will be done in int4, then upconverted. So,
> > can you confirm that your inserts look like:
> > insert into lint values ('9223372036854775807');
> OK, that was it. I inserted without quotes
Thomas Lockhart wrote:
>
> > int8 is not handled correctly on Alpha. Inserting 2^63-1, 2^63-2 and
> > 2^61...
>
> How are you doing the inserts? If you aren't coercing the "2" to be an
> int8, then (afaik) the math will be done in int4, then upconverted. So,
> can you confirm that your inserts l
> int8 is not handled correctly on Alpha. Inserting 2^63-1, 2^63-2 and
> 2^61...
How are you doing the inserts? If you aren't coercing the "2" to be an
int8, then (afaik) the math will be done in int4, then upconverted. So,
can you confirm that your inserts look like:
insert into lint values ('9