7.0.* and prior releases don't support using SQL-language functionsas operators. 7.1 will. However, invoking three SQL queries to addtwo booleans sure seems like massive inefficiency...
regards, tom lane