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.