round(CAST (4 AS numeric), 4)
postgres=# SELECT round(CAST (4 AS numeric), 4); round -------- 4.0000 (1 row) postgres=#