Changes between Version 1 and Version 2 of Ticket #35539, comment 3


Ignore:
Timestamp:
Jun 21, 2024, 8:20:43 AM (6 months ago)
Author:
Simon Charette

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #35539, comment 3

    v1 v2  
    2424----
    2525
    26 With all that said this ticket has little to do with this complexity. If you comment out the code reported to ''solve the issue'' by the reporter your test still fails Sarah and the reason is simple: `to_tsvector` is not `IMMUTABLE` unless a `regconfig` is specified [https://www.postgresql.org/docs/current/textsearch-tables.html#TEXTSEARCH-TABLES-INDEX which is covered at length in the PostgreSQL documentation].
     26With all that said this ticket has little to do with this complexity. If you comment out the code reported to ''solve the issue'' by the reporter your test still fails Sarah and the reason is simple: `to_tsvector` is not `IMMUTABLE` unless a `regconfig` is specified [https://www.postgresql.org/docs/current/textsearch-tables.html#TEXTSEARCH-TABLES-INDEX which is covered at length in the PostgreSQL documentation] and [https://docs.djangoproject.com/en/5.0/ref/contrib/postgres/search/#postgresql-fts-search-configuration included in the Django docs as well in the example].
    2727
    2828> Notice that the 2-argument version of `to_tsvector` is used. '''Only text search functions that specify a configuration name can be used in expression indexes''' (Section 11.7). This is because the index contents must be unaffected by `default_text_search_config`. If they were affected, the index contents might be inconsistent because different entries could contain `tsvectors` that were created with different text search configurations, and there would be no way to guess which was which. It would be impossible to dump and restore such an index correctly.
Back to Top