From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mark Lillywhite <mark@plasticsoftware.com.au>
Cc: pgsql-interfaces@postgreSQL.org
Subject: Re: [INTERFACES] JDBC: BigDecimal and Money confusion
Date: Sun, 19 Sep 1999 11:31:24 -0400
Message-ID: <27326.937755084@sss.pgh.pa.us> (raw)
In-Reply-To: <37E4CB1B.DE31D6B7@plasticsoftware.com.au>
Mark Lillywhite <mark@plasticsoftware.com.au> writes:
> Can someone tell me how DECIMAL/NUMERICs are stored? Is there
> somewhere I should look to find out? The end-user docs are a bit
> vague.
Use the source, Luke ;-)
src/include/utils/numeric.h and src/backend/utils/adt/numeric.c
are probably the files to look in.
IIRC from comments that Jan made, it's a pretty brain-dead
representation right now; one decimal digit per byte or something
like that. He was going to improve it to a base-10000-digit-per-short
format for speed reasons. Also, I think that there's currently a
difference between the on-disk format and the calculational in-memory
format, which would be nice to get rid of. We haven't heard from Jan
in a while, so I dunno when or if he's going to get around to that;
if you'd like to tackle it instead, go for it...
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: tgl@sss.pgh.pa.us, mark@plasticsoftware.com.au
Subject: Re: [INTERFACES] JDBC: BigDecimal and Money confusion
In-Reply-To: <27326.937755084@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox