From: | Karel Zak - Zakkr <zakkr(at)zf(dot)jcu(dot)cz> |
---|---|
To: | Michael Meskes <meskes(at)postgreSQL(dot)org> |
Cc: | PostgreSQL Hacker <pgsql-hackers(at)postgreSQL(dot)org> |
Subject: | Re: [HACKERS] Datatype MONEY |
Date: | 1999-12-13 12:13:55 |
Message-ID: | Pine.LNX.3.96.991213130008.25928A-100000@ara.zf.jcu.cz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, 13 Dec 1999, Michael Meskes wrote:
> I somehow remember the MONEY datatype has some problems and might be
> removed. Now I didn´t follow this topic closely enough, but now I've
> encountered I could use it pretty well. Of course a DECIMAL datatype fits
> the bill as good since I do not need the currency symbol in psql's output.
>
> Before I set up my DB I'd like to know which type to prefer.
>
> Michael
I have complete code for numbers formatting (to_char() compatible with
Oracle). It allow you add a currency symbol corresponding with current
locale ... and more features over basic datatypes (float4/8, int4/8).
I send it to the PACHES list next week (probably).
Example:
template1=> select float8_to_char(455.9 , 'L999D99') as price;
price
---------
Kc 455,90
(1 row)
(It is with Czech currency symbol and decimal point (locales))
IMHO is good use for money a float type.
Karel
From | Date | Subject | |
---|---|---|---|
Next Message | Karel Zak - Zakkr | 1999-12-13 12:26:47 | Re: [HACKERS] createdb with alternate location |
Previous Message | Jan Wieck | 1999-12-13 11:38:17 | Re: [HACKERS] update_pg_pwd |