Tom Lane wrote:
> "Joshua D. Drake" <[EMAIL PROTECTED]> writes:
> > Well if we are going to continue to support money (which I am against)
> > we should support the casting to numeric as that is by far a more
> > common implementation of money and we will have mixed environments.
>
> So, you don't
On Sat, 24 Nov 2007 11:27:38 -0500 (EST)
Bruce Momjian <[EMAIL PROTECTED]> wrote:
> And second, why are there no regression tests for MONEY. I see it used
> only once in the rules test.
I will be committing some regression tests as soon as I finish testing.
--
D'Arcy J.M. Cain <[EMAIL PROTECTED
On Sat, 24 Nov 2007 11:27:38 -0500 (EST)
Bruce Momjian <[EMAIL PROTECTED]> wrote:
> I am confused about two other items with MONEY. First, why can't
> anything but a string be cast to this type?
>
> test=> select 871234872319489323::money;
> ERROR: cannot cast type bigint to money
>
D'Arcy J.M. Cain wrote:
> On Fri, 23 Nov 2007 15:59:29 -0500 (EST)
> Bruce Momjian <[EMAIL PROTECTED]> wrote:
> > I also removed a ssymbol test because ssymbol will never be \0 based on
> > the code. Also, what does this do:
> >
> > if (buf[LAST_DIGIT] == ',')
> > buf[LAST_DIGIT]
Patch applied. I will email on this LAST_DIGIT issue separately.
---
Bruce Momjian wrote:
> In looking at the use of the thousands separator in formatting.c and
> psql/print.c, I now see similar problems with the MONEY type
On Fri, 23 Nov 2007 15:59:29 -0500 (EST)
Bruce Momjian <[EMAIL PROTECTED]> wrote:
> I also removed a ssymbol test because ssymbol will never be \0 based on
> the code. Also, what does this do:
>
> if (buf[LAST_DIGIT] == ',')
> buf[LAST_DIGIT] = buf[LAST_PAREN];
Good question.
In looking at the use of the thousands separator in formatting.c and
psql/print.c, I now see similar problems with the MONEY type, namely
that if the thousands separator is "" it is set to "," even if the
decimal separator is ",".
The attached patch fixes this.
I also removed a ssymbol test becau