Re: tsearch: immutable functions?

From: Teodor Sigaev <teodor(at)sigaev(dot)ru>
To: Jochem van Dieten <jochemd(at)oli(dot)tudelft(dot)nl>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: tsearch: immutable functions?
Date: 2003-06-24 11:53:50
Message-ID: 3EF83BCE.4070907@sigaev.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Read thread:

http://fts.postgresql.org/db/msg.html?mid=1359513

Jochem van Dieten wrote:
> 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
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if your
> joining column's datatypes do not match

--
Teodor Sigaev E-mail: teodor(at)sigaev(dot)ru

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jason Tishler 2003-06-24 12:12:30 Re: [HACKERS] ss_family in hba.c
Previous Message Uros 2003-06-24 11:40:09 Re: Selecting dupes from table