Re: ERROR: JOIN/USING types 'integer' and 'character

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
Cc: "Michael (dot)" <phifli(at)yahoo(dot)com>, PostgreSQL general list <pgsql-general(at)postgresql(dot)org>
Subject: Re: ERROR: JOIN/USING types 'integer' and 'character
Date: 2003-12-12 14:51:48
Message-ID: 19629.1071240708@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Oliver Elphick <olly(at)lfix(dot)co(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Christopher Browne 2003-12-12 15:01:49 Re: [NOVICE] PostgreSQL Training
Previous Message Együd Csaba 2003-12-12 14:36:19 Moving the database from a filesystem to another