Re: [GENERAL] A real currency type - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [GENERAL] A real currency type
Date
Msg-id 5538.1142982672@sss.pgh.pa.us
Whole thread Raw
In response to Re: [GENERAL] A real currency type  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-hackers
Martijn van Oosterhout <kleptog@svana.org> writes:
> On Tue, Mar 21, 2006 at 05:55:09PM -0500, Tom Lane wrote:
>> Yes, you can
>> think of advanced applications where it's useful to have random
>> additional stuff in the table, but that's exactly the point at which you
>> normally have to get down-and-dirty with some C code --- after all, what
>> is standardized code going to *do* with the additional stuff?  Nothing,
>> that's what.

> Umm, actually that extra info is very useful. For example in the
> currency type it can store the currency symbol and how many decimal
> places, etc.

And you do what with that in non-currency-specific code?  This argument
isn't holding water for me.  The "decimal places" info is in the wrong
place anyway, it should be attached to the underlying numeric type...
        regards, tom lane


pgsql-hackers by date:

Previous
From: satoshi nagayasu
Date:
Subject: Re: 8.2 planning features
Next
From: Thomas Hallgren
Date:
Subject: Re: Question about MemoryContexts and functions that returns