An attempt to put a floating-point type of a larger storage size into a location of a smaller size fails only if the value cannot be stored in the smaller-size location.
create table mytable (r REAL, d DOUBLE PRECISION, i INTEGER, de DECIMAL); 0 rows inserted/updated/deleted INSERT INTO mytable (r, d) values (3.4028236E38, 3.4028235E38); ERROR 22003: The resulting value is outside the range for the data type REAL.
INSERT INTO mytable (i) VALUES (1.09e0); 1 row inserted/updated/deleted SELECT i FROM mytable; I --------------- 1
Integer types can always be placed successfully in approximate numeric values, although with the possible loss of some precision.
INSERT INTO mytable (de) VALUES (55555555556666666666);
ERROR 22003: The resulting value is outside the range for the
data type DECIMAL/NUMERIC(5,2).
INSERT INTO mytable (i) VALUES 2147483648;
ERROR 22003: The resulting value is outside the range for the
data type INTEGER.