PegoraroF10 <marcos@f10.com.br> writes:
> So, how can I know which custom operator is being used on that comparison ?
You tell us. I don't know of any common extension that would create
a "smallint = text" operator. (A variant theory is that you didn't
make a new operator, but an implicit cast from smallint to text.
Either way, it almost certainly is a homebrew thing. Or maybe what
you are running is not stock Postgres?)
It might be interesting to try some direct test, like
SELECT 22::smallint = 'foo'::text;
For me that gives the same "operator does not exist: smallint = text"
error, but I bet your database tries to execute it.
regards, tom lane