Re: tsearch_core for inclusion - Mailing list pgsql-hackers

From Tom Lane
Subject Re: tsearch_core for inclusion
Date
Msg-id 6427.1174056159@sss.pgh.pa.us
Whole thread Raw
In response to Re: tsearch_core for inclusion  (Teodor Sigaev <teodor@sigaev.ru>)
Responses Re: tsearch_core for inclusion  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
Teodor Sigaev <teodor@sigaev.ru> writes:
> Hmm, you are prompting an idea to me how to simplify usage of full text index in 
>   simple cases.

> CREATE INDEX idxname ON tblname USING gin (textcolumn fulltext_ops);

+1 ... makes the easy cases easy, doesn't make the hard cases any
harder.

> BTW, simple syntax sugar for CREATE INDEX (fulltext_ops) may be done:
> CREATE INDEX idxname ON tblname USING FULLTEXT (textcolumn)

Not in favor of this, because FULLTEXT isn't an AM ... how would you
know whether to use GIST or GIN?  Actually, if you wanted to simplify
life a bit, you could mark fulltext_ops as being the default opclass
for text (and varchar I guess) under GIST and GIN.  Then it reduces
to just

CREATE INDEX idxname ON tblname USING gin (textcolumn);
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: UPDATE using sub selects
Next
From: Teodor Sigaev
Date:
Subject: Re: tsearch_core for inclusion