Re: cast problem in Postgresql 9.0.1

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: jd(at)commandprompt(dot)com
Cc: AI Rumman <rummandba(at)gmail(dot)com>, pgsql-general General <pgsql-general(at)postgresql(dot)org>
Subject: Re: cast problem in Postgresql 9.0.1
Date: 2011-02-01 21:31:41
Message-ID: 3346.1296595901@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Joshua D. Drake" <jd(at)commandprompt(dot)com> writes:
> On Tue, 2011-02-01 at 12:14 +0600, AI Rumman wrote:
>> I migrated my DB from Postgresql 8.1 to Postgresql 9.0.1.
>>
>> I have a table "testtab"
>> \d testtab
>> id int,
>> hours varchar
>>
>> When I execute the following:
>> select sum(hours) from testtab
>> I get cast error.
>>
> In 8.3, implicit casts were removed. You can't sum text.

You couldn't do it in previous releases, either.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alban Hertroys 2011-02-01 21:32:52 Re: Issues with generate_series using integer boundaries
Previous Message Alban Hertroys 2011-02-01 21:30:03 Re: Book recommendation?