Обсуждение: Re: Has anyone seen this SPARC bug? [Fwd: Bug#165060: postgresql:

Поиск
Список
Период
Сортировка

Re: Has anyone seen this SPARC bug? [Fwd: Bug#165060: postgresql:

От
Steve Dunham
Дата:
 > Oliver Elphick <olly@lfix.co.uk> writes:
 > > This is a Debian bug report from a SPARC user.  It doesn't happen
for me
 > > on i386 7.2.3.

 > > com.pany=# insert into foo values (1034784236789);
 > > ERROR:  Floating point conversion to int8 is out of range

 > I'm betting that rint() is broken on this platform.  It would be
 > useful to trace through the execution of dtoi8() (in
 > src/backend/utils/adt/int8.c) to see exactly why it's spitting up.

The problem is that libcrypto.so has an unresolved symbol on Debian
and this is making the "long long int is 64bit" test fail in configure
fail, so it thinks long long is not 64bit.  (So the only difference
between this and a correct build is that HAVE_LONG_LONG_INT_64 is not
defined.)

I don't know if this is the way postgresql is supposed to behave on
platforms with no 64-bit integer; if not, there is a postgresql bug
here.

Also, I'm not sure if the "upgrade the database to a new version"
scripts are from the Debian package or upstream, but it looks like
they need more error checking.  (Brian tells me that it bailed on
most of the data inserts, but claimed that everything went ok.)


Steve
dunham@cse.msu.edu



Re: Has anyone seen this SPARC bug? [Fwd: Bug#165060: postgresql:

От
Tom Lane
Дата:
Steve Dunham <dunham@cse.msu.edu> writes:
>>> Oliver Elphick <olly@lfix.co.uk> writes:
> com.pany=# insert into foo values (1034784236789);
> ERROR:  Floating point conversion to int8 is out of range

> The problem is that libcrypto.so has an unresolved symbol on Debian
> and this is making the "long long int is 64bit" test fail in configure
> fail, so it thinks long long is not 64bit.

Ah so.

> I don't know if this is the way postgresql is supposed to behave on
> platforms with no 64-bit integer; if not, there is a postgresql bug
> here.

No, that is the expected behavior: "int8" is effectively int4, and so
the above value in fact is out of range for "int8".

            regards, tom lane