Re: no implicit cast error in 9.2?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: 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 23:52:07
Message-ID: 26239.1360367527@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

AI Rumman <rummandba(at)gmail(dot)com> writes:
> 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);

No, that will work fine in any version, because you're calling upon an
assignment cast not an implicit cast. What once worked and no longer
does is cases like

SELECT length(1);

where the integer argument used to be implicitly cast to text.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2013-02-08 23:58:03 Re: Swapping volumes under tablespaces: supported?
Previous Message Tom Lane 2013-02-08 23:43:22 Re: var/log/postgresql deletion mystery Ubuntu 12.10