Re: cast problem in Postgresql 9.0.1

Поиск
Список
Период
Сортировка
От Joshua D. Drake
Тема Re: cast problem in Postgresql 9.0.1
Дата
Msg-id 1296595334.18411.38.camel@jd-desktop
обсуждение исходный текст
Ответ на cast problem in Postgresql 9.0.1  (AI Rumman <rummandba@gmail.com>)
Ответы Re: cast problem in Postgresql 9.0.1  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
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 need to
change the data type to a proper numerical type.

Joshua D. Drake

>
--
PostgreSQL.org Major Contributor
Command Prompt, Inc: http://www.commandprompt.com/ - 509.416.6579
Consulting, Training, Support, Custom Development, Engineering
http://twitter.com/cmdpromptinc | http://identi.ca/commandprompt


В списке pgsql-general по дате отправления:

Предыдущее
От: Marko Kreen
Дата:
Сообщение: Re: Problem with encode () and hmac() in pgcrypto
Следующее
От: Heine Ferreira
Дата:
Сообщение: troubleshooting Postgresql on Windows