Hm, just realize that I accidentally used "||" as both concatenation and OR in the above SQL snippet. What I meant to say was that if you wanted to compare the entire search query against the firstname, lastname, and a concatenation of them both (in both orders to account for internationalization), it'd be something like this:
u.firstname = <query>
OR u.lastname = <query>
OR u.lastname || ' ' || u.firstname = <query>
OR u.firstname || ' ' || u.lastname = <query>
Hm, just realize that I accidentally used "||" as both concatenation and OR in the above SQL snippet. What I meant to say was that if you wanted to compare the entire search query against the firstname, lastname, and a concatenation of them both (in both orders to account for internationaliz ation), it'd be something like this:
u.firstname = <query>
OR u.lastname = <query>
OR u.lastname || ' ' || u.firstname = <query>
OR u.firstname || ' ' || u.lastname = <query>