#26684: Example for Full-Text Search Index doesn't work
--------------------------------------+--------------------
Reporter: Xof | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: 1.10
Severity: Release blocker | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+--------------------
The example given for creating an index on a to_tsvector() call doesn't
actually work, since to_tsvector() is not immutable (the results of it can
change with changes to the underlying dictionaries it is ruled it is built
on).
{{{
xof=# create table t (z text);
CREATE TABLE
xof=# create index on t(to_tsvector(z));
ERROR: functions in index expression must be marked IMMUTABLE
}}}
(As a note, indexes on `tsvector`s should be GIN indexes rather than
B-tree.)
For documentation purposes in the release notes, I'd suggest pointing the
reader to the PostgreSQL documentation that describes how to handle this
situation.
--
Ticket URL: <https://code.djangoproject.com/ticket/26684>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/046.253ef5cadd21a6503a9625392a598447%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.