tsearch: immutable functions?

From: Jochem van Dieten <jochemd(at)oli(dot)tudelft(dot)nl>
To: pgsql-general(at)postgresql(dot)org
Subject: tsearch: immutable functions?
Date: 2003-06-23 23:27:41
Message-ID: 3EF78CED.4020607@oli.tudelft.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2003-06-23 23:49:11 Re: [HACKERS] ss_family in hba.c
Previous Message Chris Smith 2003-06-23 23:20:23 Re: [GENERAL] interesting PHP/MySQL thread