Re: [HACKERS] Money type display - Mailing list pgsql-hackers

From darcy@druid.net (D'Arcy J.M. Cain)
Subject Re: [HACKERS] Money type display
Date
Msg-id m0y8SiT-00000oC@druid.net
Whole thread Raw
In response to Re: [HACKERS] Money type display  (Andrew Martin <martin@biochemistry.ucl.ac.uk>)
Responses Re: [HACKERS] Money type display  (Bruce Momjian <maillist@candle.pha.pa.us>)
List pgsql-hackers
Thus spake Andrew Martin
> > I wonder if I didn't make a mistake in the money type.  As a C library
> > function it made sense to add the "$" to the display because it was
> > easy to add one to the return value if it wasn't required.  I'm finding
> > it to be a bit of a problem with my Python interface.  I was just
> > going to strip it in my module but I thought I would see if others
> > felt that it should simply be dropped from the PostgreSQL output.
> >
> Remove it! Those of us who aren't American/Canadian/Australian don't want
> a dollar sign for money anyway :-)

Right.  The original code that that comes from used locale extensively
for things like that.

Also, what about the commas?  Again, locale is supposed to be used to
determine which character to use but I am sure it just causes confusion.

In fact, perhaps we should just turn the money code into the decimal
type.  I understand we have a mechanism now for specifying an argument
to the input and output functions so we can specify the precision of
the decimal.  Is this correct?  If someone can help me out with the
type specifications, I'll start creating the code to handle decimal
types.  I'll just take the money code and modify it.

--
D'Arcy J.M. Cain <darcy@{druid|vex}.net>   |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 424 2871     (DoD#0082)    (eNTP)   |  what's for dinner.

pgsql-hackers by date:

Previous
From: Integration
Date:
Subject: Odd behavior of initdb
Next
From: The Hermit Hacker
Date:
Subject: Re: [HACKERS] Odd behavior of initdb