Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Jan 1996 14:07:46 UTC+0100
From:      Javier Martin Rueda <jmrueda@diatel.upm.es>
To:        freebsd-ports@FreeBSD.org
Subject:   Re: Postgres95 and FBSD 2.1R
Message-ID:  <884*/S=jmrueda/OU=diatel/O=upm/PRMD=iris/ADMD=mensatex/C=es/@MHS>

next in thread | raw e-mail | index | archive | help
> 	Yes, me, for example, late in October, I beleive.
> 	It worked and even passed all tests; for a pity, the guy from
> 	our site who was going to use it, found other way to do the job,
> 	so I relaxed and Postgres was left alone without an appropriate
> 	heavy testing and use. Just now I don't have it installed.
> 
> 	Yesterday I downloaded all the patches for Postgres95
> 	from s2k-ftp.cs.berkeley.edu
> 	(somewhere in postgres95/bugs subdir, I beleive, p*.html)
> 	and am planning to return to it few days later.
> 	Please remind me next week -- I'll make a diff of how I made
> 	it working and either send it to you or post it.

I compiled and installed Postgres95 2 or 3 months ago, and found one
apparent bug (though it seemed to "big" to have been unnoticed by other
people). Again, I left Postgres aside, as I had to turn to other things,
and I have done no more work on it.

Out of curiosity, can you test the following and tell me if you have the
bug too, or it's just that I did something wrong (or it has been fixed
later)? By the way, I installed it under FreeBSD 2.0-RELEASE.

Execute the following SQL script and look at the results:

create table prueba (
	r	real,
	n	integer);

insert into prueba(r) values(15.0);
update prueba set n=r;
select * from prueba;
-- The above commands should give me one row whose two fields are both
-- '15' (or a complaint saying that they are different types). Instead,
-- Postgres95 seems to just copy the binary representation from the real
-- number into the integer number, resulting in an odd integer value
-- (1097859072).

update prueba set r=0.0;
select * from prueba;
update prueba set r=n;
select * from prueba;
-- A quick verification to demonstrate that Postgres95 just copies the
-- binary representation, instead of converting the actual value (or
-- complaining about different types).

delete from prueba;
insert into prueba(n) values(15);
update prueba set r=n;
select * from prueba;
-- Another demonstration of the same bug, this time starting with a
-- "good" integer value, and getting an odd real number (2.10195e-44).




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?884*/S=jmrueda/OU=diatel/O=upm/PRMD=iris/ADMD=mensatex/C=es/>