Comparing Integers and Doubles

During automated testing we stumbled upon a problem that boiled down to transitive comparisons: If a=b, and a=c, when we assumed that b=c. Unfortunately that is not always the case, at least not in all systems. Consider the following SQL query: select a = b, a = c , b = c from ( values ( 1234567890123456789 . 0 ::double precision , 1234567890123456788 :: bigint , 1234567890123456789 :: bigint ))…