Re: Reduce NUMERIC size by 2 bytes, reduce max length to 508 digits

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Simon Riggs <simon(at)2ndquadrant(dot)com>, PostgreSQL-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Reduce NUMERIC size by 2 bytes, reduce max length to 508 digits
Date: 2005-12-03 16:43:00
Message-ID: 572.1133628180@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers pgsql-patches

Martijn van Oosterhout <kleptog(at)svana(dot)org> writes:
> On Fri, Dec 02, 2005 at 07:37:49PM -0500, Tom Lane wrote:
>> So the product I fancifully mentioned would weigh in somewhere around
>> 10^300, and thus be *well* within the capability of even the proposed
>> restricted numeric format.

> I think numbers much bigger than that are only useful for theoretical
> mathemeticians.

There are practical applications, eg, 1024-bit keys are fairly common
objects in cryptography these days, and that equates to about 10^308.
I don't really foresee anyone trying to run crypto algorithms with SQL
NUMERIC arithmetic, though ...

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Karl O. Pinc 2005-12-03 17:15:52 Re: New.* and old.* as function arguments within rules
Previous Message Stephan Szabo 2005-12-03 16:01:15 Re: deadlock detected - when multiple threads try to update

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-12-03 16:49:05 Re: Striping CLOG and Subtrans
Previous Message Tom Lane 2005-12-03 16:30:31 Re: Reducing relation locking overhead

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2005-12-03 16:46:11 Re: BUG #2056: to_char no long takes time as input?
Previous Message Bruce Momjian 2005-12-03 16:16:03 Re: [HACKERS] snprintf() argument reordering not working under Windows