Skip site navigation (1) Skip section navigation (2)

Re: [INTERFACES] JDBC: BigDecimal and Money confusion

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mark Lillywhite <mark(at)plasticsoftware(dot)com(dot)au>
Cc: pgsql-interfaces(at)postgreSQL(dot)org
Subject: Re: [INTERFACES] JDBC: BigDecimal and Money confusion
Date: 1999-09-19 15:31:24
Message-ID: 27326.937755084@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-interfaces
Mark Lillywhite <mark(at)plasticsoftware(dot)com(dot)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

pgsql-interfaces by date

Next:From: Peter MountDate: 1999-09-19 17:45:22
Subject: Re: [INTERFACES] mod_php3 distributed with RedHat6.0 (fwd)
Previous:From: Brett W. McCoyDate: 1999-09-19 14:57:40
Subject: Re: [INTERFACES] PERL

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group