so I would expect the database should keep the value intact.
1234567 is exactly representable in both float4 and numeric, so it is surprising that 1234567::float4::numeric::text yields 1234570 in PG 12.2
----
In case that matters, pgjdbc does send pass extra_float_digits=2 in the initial packet, then it upgrades to extra_float_digist=3 in case server version is 9.0+
I did try removing that parameter, and it does not resolve 1234567::float4::numeric::text issue