Oliver Elphick <olly@lfix.co.uk> writes:
> I think the error means that you are joining on columns of differing
> types. (E.g.: SELECT * FROM a JOIN b ON a.id = b.id, where a.id and
> b.id are of different types.)
More specifically, SELECT ... FROM a JOIN b USING (foo), where a.foo
and b.foo are of incompatible types. The result of the JOIN is supposed
to have just one merged column "foo", but Postgres can't figure out what
type to make that column.
regards, tom lane