automatic type cast to numeric ?

Поиск
Список
Период
Сортировка
От Peter Vazsonyi
Тема automatic type cast to numeric ?
Дата
Msg-id Pine.LNX.4.10.10102032304410.14614-100000@sun2.szif.hu
обсуждение исходный текст
Список pgsql-general
Gretings!

I try to change from using of float8 to numeric... For quantitative
calculations and storage the float8 wasn't the best choice;)
For some reasons i need automatic or explicit type cast from text to
numeric and vice versa.
But:
test=# select '123'::text::numeric;
ERROR:  Cannot cast type 'text' to 'numeric'
;(
test=# CREATE FUNCTION numeric(text) as 'SELECT float8($1)::numeric;'
LANGUAGE 'SQL';
ERROR:  parser: parse error at or near "numeric"
;(((
The another side (numeric to text) works...

I had some more clumsy shots with the type '_numeric', but i don't now
enough about the working of parametric types...

So i need Help;)

--
 thanx
 nek.

i use 7.0.2/7.0.3 i386.rpm-s


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Postgres SQL 7.1 a thank you and a possible bug
Следующее
От: "Roderick A. Anderson"
Дата:
Сообщение: RE: GIS-type databases using PostgreSQL