Konverze datoveho typu money (PGSQL)

Horák Daniel horak na sitmp.cz
Pondělí Říjen 20 13:16:31 CEST 2003


> > To je problem s neexistenci konverznich funkci. Zkusil bych 
> cestu pres
> > integer nebo float - tedy pretypovani napr.
> > money_attr::integer::numeric. Interne je money implentovan 
> jako int4,
> > kdy se pocita na "centy".
> 
> select price::integer from order_tbl where price is not null 
> ERROR:  Cannot cast type money to integer
> 
> to same na numeric, char, varchar :(

Tak to uz zbyva jen dump+reload tabulky nebo dopsani konverznich funkci
(muze pomoct
http://archives.postgresql.org/pgsql-patches/2001-06/msg00228.php).


			Dan


Další informace o konferenci Databases