Re: [HACKERS] Upgrades for 6.4.1 - Mailing list pgsql-hackers

From Oleg Bartunov
Subject Re: [HACKERS] Upgrades for 6.4.1
Date
Msg-id Pine.GSO.3.96.SK.981219130610.11478B-100000@ra
Whole thread Raw
In response to Re: [HACKERS] Upgrades for 6.4.1  ("Thomas G. Lockhart" <lockhart@alumni.caltech.edu>)
List pgsql-hackers
On Sat, 19 Dec 1998, Thomas G. Lockhart wrote:

> Date: Sat, 19 Dec 1998 02:58:32 +0000
> From: "Thomas G. Lockhart" <lockhart@alumni.caltech.edu>
> To: Jan Wieck <jwieck@debis.com>
> Cc: hannu@trust.ee, maillist@candle.pha.pa.us, hackers@postgreSQL.org
> Subject: Re: [HACKERS] Upgrades for 6.4.1
> 
> >     Easy - and the type coersion stuff helps alot!
> >     Up  to  now  (1.5  hours  hacking) I have a NUMERIC type that
> >     handles  '+'  completely,  including  overflow   checks   and
> >     rounding.
> 
> Neat. I was poking around waiting on a freeware extended-precision
> numerical package, but hadn't found anything with a BSD-style license.

Did you try search SAL ( Sci. Application for Linux) ?
I just did search for 'precision' and found abot 12 items. Don't know
about license bit some of them like
<a href="http://www.hut.fi/~mtommila/apfloat/">apfloat - A C++ High Performance 
Arbitrary Precision Arithmetic Package</a> are freeware.
>From web page:
Apfloat is a high performance arbitrary precision package. That means you can do calculations involving
millions of digits with it. It uses Number Theoretic Transforms . It's simple to use. It's fast. It's freeware.



> 
> >     Another  tricky  part I expect when telling the parser that a
> >     literal NUMERIC must not be enclosed into single quotes.
> 
> This is probably the worst part, since you would hate to take the hit
> representing everything as extended precision even if the actual range
> is int4/float8. Perhaps we can read as those, but if we get a failure
> then escalate to your extended precision type(s). The automatic type
> conversion stuff should convert later if necessary, so it might be
> transparent and relatively fast.
> 
> >     The only ugly thing is, that I needed to  put  the  precision
> >     AND  the  scale together into atttypmod (I limited both to 99
> >     for now and put them as prec<<8 |  scale  into).  So  pg_dump
> >     will need attention later.
> 
> As Bruce points out, that was anticipated (but I agree it's ugly). Shift
> over 16 bits if you want...
> 
> Congrats!
> 
>                         - Tom
> 

_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83



pgsql-hackers by date:

Previous
From: The Hermit Hacker
Date:
Subject: Re: [HACKERS] CVS Web?
Next
From: Vadim Mikheev
Date:
Subject: Re: [HACKERS] MVCC works in serialized mode!