Isn't plainto_tsquery() what you're looking for?
Yes if plainto_tsquery() is safe enough for inputting user search keywords it looks like it is. I didn't knew it existed.
Thanks ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings