Ardian Xharra wrote:
> For the column: date(varchar 8) '2000606' the
> SELECT ascii(substring(date,4,1)) from jnlsale WHERE id_jnlsale=28384
> gives: 22
> SELECT ascii('6'); gives 54
Hmm - a difference of 32, or a single bit (2^5).
> For the column: amount(float 8) 1.20932764209866e-307 the
> SELECT ascii(substring(amount,20,1)) from jnlsale WHERE id_jnlsale=28382
> gives: 48
Sorry - this only applies to the text. I'd need to figure out the
internal format of the float8 and see what happened.
Well, if all the textual differences are single-bit (1,2,4,8,16,32...)
I'd suspect hardware. I can't imagine the kind of bug in PostgreSQL that
would cause that kind of error.
I can imagine a faulty RAM chip or slowly failing hard-disk causing that
kind of error though. I'd find a Linux live CD that supports memtest86
(or one of its spin-offs) and leave it testing your RAM for 24 hours or so.
--
Richard Huxton
Archonet Ltd