Search Postgresql Archives

Re: Implicit CAST is not working in Postgresql 8.4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 28 September 2010 07:37, AI Rumman <rummandba@xxxxxxxxx> wrote:
> I migrated data from Postgresql 8.1 to  Postgresql 8.4 using pg_dump.
> But now I found that, most of the queries in my applicaiton are being
> failed. Invesitigating the problem, I found that no function is available in
> the DB to CAST INT to TEXT etc.
> Most of the queries are failed because implicit cast is not working
> properly.
> Any idea how to solve it.

As of 8.3 non-text types don't automatically cast to text.  You'll
need to use a cast.

So:

WHERE my_int_col = my_text_col

becomes

WHERE my_int_col::text = my_text_col

Regards
-- 
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux