title: How to make a update with value from a cast?
body: <p>I have an <code>INSERT INTO</code> query that takes an input from a html form and insert it in a table on postgres, one of the columns's value is a GeoJSON. Now i'm trying to prepare a trigger function that take the json after the <code>INSERT</code> query and convert it to geometry and insert this geometry in another column on the same table.</p>
  
  <p><code>SELECT ST_GeomFromText(
           ST_AsText(
             CAST(ST_GeomFromGeoJSON(t1."column-name") AS TEXT)
           ), 4326
         )
  FROM (SELECT "column-name"
        FROM table-name
        ORDER BY id DESC
        LIMIT 1) AS t1;</code></p>
  
  <p>With this query i take the GeoJSON from the last row inserted and convert it to a geometry, but i don't know how to insert this geometry value in another column.</p>