"Andrus" <kobruleht2(at)hot(dot)ee> 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