Re: Reduce NUMERIC size by 2 bytes, reduce max length to 508 digits - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: Reduce NUMERIC size by 2 bytes, reduce max length to 508 digits
Date
Msg-id 20051203213000.GA27769@wolff.to
Whole thread Raw
In response to Re: Reduce NUMERIC size by 2 bytes, reduce max length to 508 digits  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Reduce NUMERIC size by 2 bytes, reduce max length to 508 digits
List pgsql-general
On Sat, Dec 03, 2005 at 11:43:00 -0500,
  Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Martijn van Oosterhout <kleptog@svana.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 ...

2046 bit keys are becoming more common. However, math using these keys is
usually done modulo a product of two primes and there are ways of doing the
calculations that are going to be much faster than doing them the way
Postgres does. So it is unlikely that anyone would be using Postgres' numeric
type to do this in any case.


pgsql-general by date:

Previous
From: Andreas Kretschmer
Date:
Subject: Re: beginne' - inserting a record
Next
From: "Raymond O'Donnell"
Date:
Subject: Re: beginne' - inserting a record