Disclosure: I build Schemity , a desktop ERD tool - this post is from our blog and uses it for the examples. TL;DR: Use a generated column when the value comes from other columns in the same row through immutable functions, because the database guarantees it and nobody can write to it. Use a trigger only when the value needs another table, the current time, or a function PostgreSQL does not call immutable. On PostgreSQL 18 a generated column is virtual unless you write STORED , and a v...