Opened 8 years ago

Last modified 8 years ago

#26684 closed Cleanup/optimization

Example for Full-Text Search Index doesn't work — at Version 1

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 (last modified by Christophe Pettus)

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 tsvectors should be GIN indexes rather than B-tree.)

For documentation purposes, I'd suggest pointing the reader to the PostgreSQL documentation that describes how to handle this situation.

Change History (1)

comment:1 by Christophe Pettus, 8 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top