Raw SQL / Postgres stored generated column in schema

Is it possibile to add raw sql, or more specifically stored generated columns to the schema? Trying to store a length field of a text column.
Was this page helpful?