From: | Oleg Bartunov <oleg(at)sai(dot)msu(dot)su> |
---|---|
To: | JohnSense <sanmateoquest(at)yahoo(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: tsearch2 problems in postgres? |
Date: | 2007-07-28 18:43:44 |
Message-ID: | Pine.LNX.4.64.0707282243030.18739@sn.sai.msu.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
somewhere you need to use to_tsvector instead of to_tsquery.
Oleg
On Thu, 26 Jul 2007, JohnSense wrote:
> SELECT *, rank(ts_vec, to_tsquery('default', 'lc & 11(')) FROM us
> WHERE ts_vec @@ to_tsquery('default', 'lc & 11(') LIMIT 9 OFFSET 0
> this query gives an error
> in tsearch2
> saying syntax error
> any idea on how 2 strip the non safe tsearch stuff
> before feeding it to sql
> this is from a web search interface?
> psycopg2.ProgrammingError at /search ->
> if i give inpu as lc !! (
> is there a list of characters that need to stripped out before doing
> @@ in tsearch2
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
>
Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru)
Sternberg Astronomical Institute, Moscow University, Russia
Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Smith | 2007-07-28 18:54:24 | Re: Data on NAS / NFS |
Previous Message | Michael Fuhr | 2007-07-28 18:32:39 | Re: Require entry of MD5 hash instead of plaintext password? |