create table float4test (id serial primary key, nr float4); create language plpgsql; CREATE OR REPLACE FUNCTION in_test4(pnr float4) RETURNS integer AS $$ DECLARE datas RECORD; BEGIN Insert into float4test (nr) values (pnr) returning id into datas; RETURN datas.id; END; $$ LANGUAGE plpgsql; CREATE OR REPLACE FUNCTION in_test8(pnr float8) RETURNS integer AS $$ DECLARE datas RECORD; BEGIN Insert into float4test (nr) values (pnr) returning id into datas; RETURN datas.id; END; $$ LANGUAGE plpgsql;