Have you installed any updates for PostgreSQL? The latest security update fixed something with type checks or so. I've seen the same error message also on the BUGS mailing list concerning a broken CHECK constraint on a table row. Perhaps this is the cause of the error messages.
Well, I've just dumped old data, installed v8.2.2 from sources, restored data. Unfortunately the error remains the same and we have no ideas left. Error is again: "Table has type character varying, but query expects character varying."
The error is about a varchar column, with no other special attributed. It was working flawlessly for a long time.