Versions 8.0, 8.1 work fine, while version 8.2.5 (and earlier probably too):
postgres=> CREATE TEMP TABLE test (id varchar(32));
CREATE TABLE
postgres=> INSERT INTO test SELECT * FROM generate_series(1,100);
INSERT 0 100
postgres=> SELECT * FROM test WHERE id IN (50);
id
----
50
(1 row)
postgres=> SELECT * FROM test WHERE id IN (55,50);
ERROR: IN types character varying and integer cannot be matched
This works fine in version 8.0 and 8.1.
The bug was found by Michał Wojas.
Regards,
Dawid Kuroczko