int2/int4 Failure with 6.5.1 and SlackWare 4.0 - Mailing list pgsql-general

From Charles Tassell
Subject int2/int4 Failure with 6.5.1 and SlackWare 4.0
Date
Msg-id 4.1.19990728130813.00c555e0@mailer.isn.net
Whole thread Raw
Responses Re: [GENERAL] int2/int4 Failure with 6.5.1 and SlackWare 4.0
List pgsql-general
Hi there,

  When running the regression tests for Postgres 6.5.1 on my SlackWare 4.0
box, I received an error on the int2 and int4 types.  Here's what was in
the regress.out file:

text .. ok
strings .. ok
int2 .. failed
int4 .. failed
int8 .. ok
oid .. ok
float4 .. ok
float8 .. ok


Here is the error from int2.out:

QUERY: CREATE TABLE INT2_TBL(f1 int2);
QUERY: INSERT INTO INT2_TBL(f1) VALUES ('0');
QUERY: INSERT INTO INT2_TBL(f1) VALUES ('1234');
QUERY: INSERT INTO INT2_TBL(f1) VALUES ('-1234');
QUERY: INSERT INTO INT2_TBL(f1) VALUES ('34.5');
ERROR:  pg_atoi: error in "34.5": can't parse ".5"
QUERY: INSERT INTO INT2_TBL(f1) VALUES ('32767');
QUERY: INSERT INTO INT2_TBL(f1) VALUES ('-32767');
QUERY: INSERT INTO INT2_TBL(f1) VALUES ('100000');
ERROR:  pg_atoi: error reading "100000": Math result not representable
QUERY: INSERT INTO INT2_TBL(f1) VALUES ('asdf');
ERROR:  pg_atoi: error in "asdf": can't parse "asdf"
QUERY: SELECT '' AS five, INT2_TBL.*;


Any ideas what is causing this?  It seems to be a problem with the pg_atoi
function giving a fatal error on any data that is not formatted exactly
right, or too large for it's return type.



pgsql-general by date:

Previous
From: Leon
Date:
Subject: Again about (dead)locks
Next
From: Herouth Maoz
Date:
Subject: Re: [GENERAL] int2/int4 Failure with 6.5.1 and SlackWare 4.0