Re: [BUGS] strange (numeric) casting behaviour

2006-05-30 Thread Tom Lane
Sven Welte <[EMAIL PROTECTED]> writes: > I'm experience some strange behaviour when casting numeric values. This doesn't really have anything to do with casting as such. The system thinks it can throw away the cast to NUMERIC(9,2) because the function result is declared as already NUMERIC(9,2) ..

[BUGS] strange (numeric) casting behaviour

2006-05-30 Thread Sven Welte
I'm experience some strange behaviour when casting numeric values. Given the following SQL-Statement: SELECT a_int, a_num, CAST (a_num AS NUMERIC(9,1)) AS CastTo9_1, CAST (a_num AS NUMERIC(9,2)) AS CastTo9_2, CAST (a_num AS NUMERIC(9,3)) AS CastTo9_3 FROM f_numtest(); Generated output is: a_int