Re: no implicit cast error in 9.2?

From: Kevin Grittner <kgrittn(at)ymail(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>, AI Rumman <rummandba(at)gmail(dot)com>
Cc: pgsql-general General <pgsql-general(at)postgresql(dot)org>
Subject: Re: no implicit cast error in 9.2?
Date: 2013-02-08 21:50:05
Message-ID: 1360360205.81926.YahooMailNeo@web162901.mail.bf1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com> wrote:
> On 02/08/2013 12:23 PM, AI Rumman wrote:

>> I got a bit confused after installing this version. So far I used to
>> know that from Postgresql 8.3 implicit casting has been removed and the
>> following should not work at 8.3 :
>> create table testtab ( id varchar, id1 int)
>> insert into testtab values (1,1);
>>
>> Where it was good to work at 8.1
>>
>> http://osdir.com/ml/pgsql-general/2011-02/msg00055.html
>>
>> I also faced the problem earlier.
>>
>> But in 9.2 it is working perfectly.
>> Am I missing any release notes?
>>
>> Please share your opinion. It will be appreciated.
>
> As I remember implicit casting was not entirely removed and the
> text <--> int combination was kept.

I think it has more to do with retaining (or adding back, I don't
recall) *assignment* casts which aren't supported as *implicit*
casts.

test=# select '1'::int = '1'::text;
ERROR:  operator does not exist: integer = text
LINE 1: select '1'::int = '1'::text;
                        ^
HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.

-Kevin

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Steve Crawford 2013-02-08 22:40:32 Re: Restoring a database dump from 9.0 to 9.2
Previous Message Adrian Klaver 2013-02-08 21:20:39 Re: no implicit cast error in 9.2?