Opened 8 years ago
Last modified 8 years ago
#26684 closed Cleanup/optimization
Example for Full-Text Search Index doesn't work — at Initial Version
Reported by: | Christophe Pettus | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | 1.10 |
Severity: | Release blocker | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
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.
Note:
See TracTickets
for help on using tickets.