Re: [HACKERS] Datatype MONEY

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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 16:11:50
Message-ID: 11872.945101510@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Michael Meskes <meskes(at)postgreSQL(dot)org> writes:
> BTW could anyone tell me how exactly NUMERIC is stored? Just for curiosity.

I believe it's a simple-minded BCD format, one decimal digit per byte.

Jan has been muttering about reimplementing it as radix-10000, storing
four decimal digits per short instead of one per byte; that'd reduce
the number of iterations in the inner calculation loops by 4x, without
making the elementary steps noticeably more expensive on modern hardware...

regards, tom lane

Browse pgsql-hackers by date

  From Date Subject
Next Message Gunther Schadow 1999-12-13 16:54:04 Re: [HACKERS] Datatype MONEY
Previous Message Tom Lane 1999-12-13 16:02:41 Re: [HACKERS] update_pg_pwd