Search Postgresql Archives

Re: Safe usage of tsearch2: to_tsquery('<user input>')

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



cluster <skrald@xxxxxxxxxx> writes:
> In a web application I would like to use tsearch2 to search for by-user 
> entered key words. That is, the user provides the keywords in a space 
> separated list in some input text field. For that I use 
> to_tsquery('<user keywords>') but I would like to do this in a safe way 
> so that the user cannot misuse to_tsquery() by entering some harmful string.

Isn't plainto_tsquery() what you're looking for?

			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux