numeric type conversions

Поиск
Список
Период
Сортировка
От Ruslan A Dautkhanov
Тема numeric type conversions
Дата
Msg-id 3D8FEC6C.74A034C4@scn.ru
обсуждение исходный текст
Ответы Re: numeric type conversions  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Hi,

I should cast field of 'text' type to the 'numeric' type,
but PG output error message: "ERROR:  Cannot cast type 'text' to
'numeric'".
I had tried to use conversion to type 'float' and all works good,
and now I must write quaries like next one:
    SELECT price::float::numeric .... FROM priceValues WHERE ...

Why confusion situation between types numeric, float and text ?
There are any reasons to not to write default type conversion
from 'text' to 'numeric' in the PostgreSQL 7.3?

Imho, almost all types should have default convertors from and to
the 'text' (varchar etc) type..

Thanks,
Ruslan A Dautkhanov

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Bug #779: query 'SELECT '{1,2}' *= NULL' crash backend
Следующее
От: fredrik chabot
Дата:
Сообщение: Re: some other backend died abnormally