Re: Join on incompatible types

From: Laurent Martelli <laurent(at)aopsys(dot)com>
To: Shridhar Daithankar <shridhar_daithankar(at)myrealbox(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Join on incompatible types
Date: 2003-11-19 12:16:03
Message-ID: 87ptfok0zg.fsf@news.nerim.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

>>>>> "Shridhar" == Shridhar Daithankar <shridhar_daithankar(at)myrealbox(dot)com> writes:

[...]

Shridhar> 2. Try following query EXPLAIN ANALYZE SELECT * from lists
Shridhar> join classes on classes.id=lists.value where
Shridhar> lists.id='16'::integer;

Shridhar> classes.id=lists.value::integer.

With classes.id of type integer and lists.value of type varchar, I get
"ERROR: Cannot cast type character varying to integer", which is not
such a surprise.

Thanks for your help anyway.

--
Laurent Martelli
laurent(at)aopsys(dot)com Java Aspect Components
http://www.aopsys.com/ http://jac.aopsys.com

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Shridhar Daithankar 2003-11-19 12:31:49 Re: Join on incompatible types
Previous Message Shridhar Daithankar 2003-11-19 10:19:23 Re: Join on incompatible types