From: | Teodor Sigaev <teodor(at)sigaev(dot)ru> |
---|---|
To: | AgentM <agentm(at)themactionfaction(dot)com> |
Cc: | PostgreSQL-development hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: tsearch2 error msg |
Date: | 2006-10-03 17:03:46 |
Message-ID: | 452297F2.8050401@sigaev.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> This is great news- previously, I was using various regexes to sanitize
> input into user-accessible search fields. Would it be build in some
> simple query language?
>
> "sam AND spade"
> "blue OR yellow"
> "(same AND spade) OR (blue AND yellow)"
That's exactly to_tsquery syntax, just change AND to & and OR to |. :)
So, if you can validate AND/OR then you can validate &/| syntax or validate
AND/OR and change they to tsquery's equivalents.
--
Teodor Sigaev E-mail: teodor(at)sigaev(dot)ru
WWW: http://www.sigaev.ru/
From | Date | Subject | |
---|---|---|---|
Next Message | Magnus Hagander | 2006-10-03 17:21:25 | Re: src/tools/msvc usage instructions |
Previous Message | Neil Conway | 2006-10-03 17:03:24 | Re: PG qsort vs. Solaris |