What does “ERROR: pg_atoi: error in : can’t parse ” mean?

This is one of those vague messages, which takes a little time to run down, but once you understand it, is easily fixed.  Basically, this error happens because you have mismatch and incompatible fields.

Question

What does “ERROR: pg_atoi: error in <ascii>: can’t parse <ascii>” mean?

Answer

The error is the result of an implicit conversion being performed on a character field (varchar/char) while being compared to a numeric field or value.

Vendor Reference Link