Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#26684 closed Cleanup/optimization (fixed)

Example for Full-Text Search Index doesn't work

Reported by: Christophe Pettus Owned by: Christophe Pettus
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 (7)

comment:1 by Christophe Pettus, 8 years ago

Description: modified (diff)

comment:2 by Christophe Pettus, 8 years ago

Owner: changed from nobody to Christophe Pettus
Status: newassigned

comment:3 by Christophe Pettus, 8 years ago

Last edited 8 years ago by Tim Graham (previous) (diff)

comment:4 by Christophe Pettus, 8 years ago

Resolution: fixed
Status: assignedclosed

Documentation patch pull request submitted.

comment:5 by Tim Graham, 8 years ago

Has patch: set
Triage Stage: UnreviewedAccepted

A ticket isn't marked fixed until the patch is committed.

comment:6 by Tim Graham <timograham@…>, 8 years ago

In 9210752:

Fixed #26684 -- Removed incorrect index example in docs/ref/contrib/postgres/search.txt.

comment:7 by Tim Graham <timograham@…>, 8 years ago

In 3e1c8fc:

[1.10.x] Fixed #26684 -- Removed incorrect index example in docs/ref/contrib/postgres/search.txt.

Backport of 92107522ed3568740ec7c3597db50b5c3a6e84d3 from master

Note: See TracTickets for help on using tickets.
Back to Top