I have this table properties, which has a column atomic\_mass of type NUMERIC(9,6):

```
 atomic_mass 
-------------
    1.008000
    4.002600
    6.940000
    9.012200
   10.810000
   12.011000
   14.007000
   15.999000
    1.000000
(9 rows)

```

So I want to remove all the trailing zeros of the column such as 1.008, 4.0026, etc.
So I tried to do the following

```
UPDATE properties SET atomic_mass=trim(trailing '0' from atomic_mass::text)::numeric;

```

But it's not working. I tested the trim function which works fine. If I type

```
SELECT trim(trailing '0' from atomic_mass::text)::numeric from properties

```

it returns

```
rtrim  
--------
  1.008
 4.0026
   6.94
 9.0122
  10.81
 12.011
 14.007
 15.999
      1

```

The column that I wanted. So what is it that I am doing wrong here?
I am using PostgreSQL 12.9.