Fixes for MONEY type using locale

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: darcy(at)druid(dot)net
Cc: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Fixes for MONEY type using locale
Date: 2007-11-23 20:59:29
Message-ID: 200711232059.lANKxTP27953@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

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 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];

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://postgres.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

Attachment Content-Type Size
/pgpatches/money text/x-diff 3.6 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2007-11-23 21:54:39 Re: [HACKERS] Transaction question
Previous Message Tom Lane 2007-11-23 19:01:08 Re: buildfarm member tapir failing PLCheck in 8.1 branch

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2007-11-24 01:33:34 Re: [BUGS] BUG #3769: Fail to make bcc32.mak for libpq
Previous Message Marko Kreen 2007-11-23 17:55:27 Re: Cleaner API for appendStringInfoVA