tsearch: immutable functions? - Mailing list pgsql-general

From Jochem van Dieten
Subject tsearch: immutable functions?
Date
Msg-id 3EF78CED.4020607@oli.tudelft.nl
Whole thread Raw
Responses Re: tsearch: immutable functions?  (Teodor Sigaev <teodor@sigaev.ru>)
List pgsql-general
I was wondering if there is any reason not to define the functions from
tsearch as immutable. What I am trying to achieve is that I don't have
to create a separate field to index as is explained in the manual, but
just create a functional gist index.

Instead of:
alter table titles add titleidx txtidx;
update titles set titleidx=txt2txtidx(title);
create index t_idx on titles using gist(titleidx);

just:
create index t_idx on titles using gist(txt2txtidx(title));

But creating a functional index requires an immutable function.

Jochem




pgsql-general by date:

Previous
From: Josh Berkus
Date:
Subject: Re: [pgsql-advocacy] interesting PHP/MySQL thread
Next
From: Jan Wieck
Date:
Subject: Re: [pgsql-advocacy] interesting PHP/MySQL thread