Re: cast from integer to money - Mailing list pgsql-hackers

From Tom Lane
Subject Re: cast from integer to money
Date
Msg-id 9152.1301888036@sss.pgh.pa.us
Whole thread Raw
In response to Re: cast from integer to money  (Robert Haas <robertmhaas@gmail.com>)
List 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 by date:

Previous
From: Robert Haas
Date:
Subject: Re: Finding a flow when query is fired in postgresql
Next
From: Joseph Adams
Date:
Subject: Re: cast from integer to money