title: Django Full Text SearchVectorField obsolete in PostgreSQL
body: <p>I'm using Django's inbuilt <strong>full text search</strong> with PostgreSQL.</p>
  <p>The Django docs say that performance can be improved by using a <a href="https://docs.djangoproject.com/en/3.0/ref/contrib/postgres/search/#searchvectorfield" rel="noreferrer"><code>SearchVectorField</code></a>. That field keeps a pre-generated <a href="https://www.postgresql.org/docs/10/datatype-textsearch.html#DATATYPE-TSVECTOR" rel="noreferrer"><code>ts_vector</code></a> column with all the relevant lexemes alongside the model, rather than generating it on the fly during every search.</p>
  <p>However, with this approach the <code>ts_vector</code> must be updated whenever the model is updated. To keep it synchronised, the Django docs suggest using &quot;triggers&quot;, and refer us to the PostgreSQL documentation for more details.</p>
  <p>However, the PostgreSQL docs themselves say that the trigger approach is now <a href="https://www.postgresql.org/docs/current/textsearch-features.html#TEXTSEARCH-UPDATE-TRIGGERS" rel="noreferrer">obsolete</a>. Instead of manually updating the <code>ts_vector</code> column, it is better to keep the column automatically up-to-date by using a <a href="https://www.postgresql.org/docs/current/textsearch-tables.html#TEXTSEARCH-TABLES-INDEX" rel="noreferrer">stored generated column</a>.</p>
  <p><strong>How can I use PostgreSQL's recommended approach with Django</strong>?</p>