Re: [GENERAL] A real currency type

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [GENERAL] A real currency type
Date: 2006-03-21 23:11:12
Message-ID: 5538.1142982672@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Martijn van Oosterhout <kleptog(at)svana(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2006-03-21 23:36:56 Re: index scan backward plan question
Previous Message Martijn van Oosterhout 2006-03-21 23:07:07 Re: [GENERAL] A real currency type

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-03-21 23:33:15 Re: Poor performance o
Previous Message Martijn van Oosterhout 2006-03-21 23:07:07 Re: [GENERAL] A real currency type