removed to_d as it changes behaviour of decimal Postgres columns