Martijn van Oosterhout <kleptog@svana.org> writes:
> If you created such a function, and made an operator with it that was a
> communtator of LIKE (call it "is liked by"), would the planner be smart
> enough to split the ANY and commutate it to the normal order?
No, at least not as of 8.2, because ANY translates as a ScalarArrayOpExpr
which only comes in the one flavor (array on the right).
regards, tom lane