I have attached some SQL which produces what to me, at least, is
rather unexpected results. Selecting real columns into double
precision columns loses some precision. Is this expected or documented
anywhere?

Thanks,
DROP TABLE precision_test;
DROP TABLE precision_test2;

CREATE TABLE precision_test
(
  foo real
);

INSERT INTO precision_test
  SELECT 20.20
UNION SELECT 1969.22;

CREATE TABLE precision_test2
(
  foo double precision
);

INSERT INTO precision_test2 (foo) SELECT foo from precision_test;


SELECT * FROM precision_test;
SELECT * FROM precision_test2;
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to