title: Is it possible to update a column(automatically) with "current_timestamp" in PostgreSQL using "Generated Columns"?
body: <p>Is it possible to update a column (automatically) with &quot;current_timestamp&quot; in PostgreSQL using &quot;<a href="https://www.postgresql.org/docs/12/ddl-generated-columns.html" rel="noreferrer">Generated Columns</a>&quot;, whenever the row gets update?</p>
  <p>At present, I am using trigger to update the audit field <code>last_update_date</code>. But I am planning to switch to generated column</p>
  <pre><code>ALTER TABLE test ADD COLUMN last_update_date timestamp without time zone 
  GENERATED ALWAYS AS (current_timestamp) STORED;
  </code></pre>
  <p>Getting error while altering column</p>
  <pre><code>ERROR: generation expression is not immutable
  </code></pre>