Anyone knows how to call self defined operator in postgresql?
I hava the following operator:
CREATE OR REPLACE FUNCTION algo.fun_temp(IN exp BOOLEAN)
RETURNS INTEGER AS $$
BEGIN
RETURN NOT exp;
END;
$$ LANGUAGE plpgsql;
CREATE OPERATOR algo.~
(
PROCEDURE = algo.fun_temp,
RIGHTARG = BOOLEAN
);
And when I try to call this operator with SELECT algo.~ TRUE, the client complains
"ERROR: syntax error at or near "~"
LINE 1: SELECT algo.~ TRUE"
Anyone knows what the problem is? Any help is appreciated.
cheng