Re: cast from integer to money

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: cast from integer to money
Дата
Msg-id 9152.1301888036@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: cast from integer to money  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Fri, Apr 1, 2011 at 10:33 PM, Joseph Adams
> <joeyadams3.14159@gmail.com> wrote:
>> The only other numeric types (other than oid, cardinal_number,
>> etc.) that can't be casted directly to money are float4 and float8,
>> and I suspect this is intentional.

> Agreed.

BTW, I think inclusion of int2 in this patch is just a waste of code
space.  The main argument for supporting these casts seems to be that
integer literals produced by the parser should be castable to money
without special pushups.  But the parser never produces native int2
constants.  So int4 and int8 will cover all the useful cases.
        regards, tom lane


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Finding a flow when query is fired in postgresql
Следующее
От: Joseph Adams
Дата:
Сообщение: Re: cast from integer to money