"Andrus" <[EMAIL PROTECTED]> writes: >>> Why numeric(2) is not casted to integer automatically ? >> >> Because it would lose data, eg '4.4' being rounded to 4.
> I tought that numeric(2) can store only integer data, without decimal > points. Oh, I see your confusion: you're supposing that we might make different casting decisions about numeric(2) than, say, numeric(2,1). Sorry, it doesn't work that way. The base data type is all that is used to determine the applicability of casts (or any other function). regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly