Re: Converting between varchar and float when updating

Поиск
Список
Период
Сортировка
От Dmitriy Igrishin
Тема Re: Converting between varchar and float when updating
Дата
Msg-id BANLkTi=J9-N43SE+AecrvoDAwam5SUtFXA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Converting between varchar and float when updating  (Vibhor Kumar <vibhor.kumar@enterprisedb.com>)
Ответы Re: Converting between varchar and float when updating  (Vibhor Kumar <vibhor.kumar@enterprisedb.com>)
Список pgsql-general


2011/4/28 Vibhor Kumar <vibhor.kumar@enterprisedb.com>

On Apr 28, 2011, at 3:22 PM, Dmitriy Igrishin wrote:

> NB:  I am sure that OP is not sure :-) And since foo.bar is varchar,
> it is better to use numeric instead of float :-)


Now, this make to ask question, why numeric? How its better than float?
Only one point, Vibhor. I believe that varchar data type was chosen for
exact storage of numeric values. According to chapter 8.1.3 of the doc.
for this case the usage of numeric is preferred over floating data types.

Thanks & Regards,
Vibhor Kumar
EnterpriseDB Corporation
The Enterprise PostgreSQL Company
vibhor.kumar@enterprisedb.com
Blog:http://vibhork.blogspot.com




--
// Dmitriy.


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

Предыдущее
От: Vibhor Kumar
Дата:
Сообщение: Re: Converting between varchar and float when updating
Следующее
От: Vibhor Kumar
Дата:
Сообщение: Re: Converting between varchar and float when updating