I think with upgrade X.Y to X.Y+1 version of pgsql you need dump/restore all
databases, isn't it?
So, for upgrading tsearch to V2 you need to do following:
1 rename columns or typecast for type txtidx to tsvector, query_txt to tsquery
2 rename function txt2txtidx to to_tsvector, ( may be to strip(to_tsvector()), now tsvector has information for
ranking), trigger 'tsearch' isn't changed
3 operator class (in create index command) gist_txtidx_ops to gist_tsvector_ops
4 In queries: operator ## to @@ to_tsquery() and remove mquery_txt typecast
5 If your locale of pgsql differ from 'C', execute before first query select set_curcfg('default');
That's all. So upgrade from v1 to v2 isn't difficult.
Christopher Kings-Lynne wrote:
>>>>>Out of interest - is it completely backwards compatible?
>>>>
>>>>unfortunately, no
>>>
>>>Then surely fully replacing tsearch will cause badness?
>>
>>I see, so are you suggesting separate dir for tsearch v2 ?
>
>
> Well, we use tserach 1 extensively. I want to be able to upgrade to 7.4 and
> have nothing break!
>
> If things will break, then you need to have a tsearch2 dir instead.
>
> Chris
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
--
Teodor Sigaev E-mail: teodor@sigaev.ru