From: | Teodor Sigaev <teodor(at)sigaev(dot)ru> |
---|---|
To: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> |
Cc: | Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: How to submit Tsearch V2 ? |
Date: | 2003-07-04 11:04:49 |
Message-ID: | 3F055F51.4020205@sigaev.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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(at)postgresql(dot)org)
--
Teodor Sigaev E-mail: teodor(at)sigaev(dot)ru
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Huxton | 2003-07-04 11:12:25 | Re: PostgreSQL vs. MySQL |
Previous Message | Rafal Kedziorski | 2003-07-04 10:03:03 | PostgreSQL vs. MySQL |