Re: How to implement GOMONTH function

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: How to implement GOMONTH function
Дата
Msg-id 22019.1180563266@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: How to implement GOMONTH function  ("Andrus" <kobruleht2@hot.ee>)
Список pgsql-general
"Andrus" <kobruleht2@hot.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

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Full vacuum may reclaim space
Следующее
От: Ben
Дата:
Сообщение: Re: DRDB risk factors?