I'm wondering if the negator clause of
CREATE OPERATOR specifies how the negator can be interpreted, or how it will be interpreted. For example, if I have an operator
>= and I set the negator to the operator
NOT(x >= y) always be interpreted as
x < y, or does it just mean that it will be interpreted that way when it's advantageous.
I'm asking because I'd like to be able to be able to use
NOT(x op y) in my queries as something other than the complement of
x op y. Is this possible and/or would it be playing with fire?
Concretely, I have a composite type with a subcolumn
match_id and a subcolumn
second. I want to be able to use, for example,
NOT(x >= y) to mean
x.match_id = y.match_id AND x.second < y.second, which would be encoded in the operator