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

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: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: 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 00:37:49
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-generalpgsql-hackerspgsql-patches
I wrote:
> The actual effective limit on NUMERIC is presently 10^128K, which is
> probably enough to count the femtoseconds remaining until the heat death
> of the universe, and then multiply that by the number of elementary
> particles therein ;-).

Should have done my research first.  A little googling says that

* The total number of particles in the universe has been
  variously estimated at numbers from 10^72 up to 10^87.

* The time to the heat death of the universe has been estimated at
  10^200 years (and if there's one significant digit in that exponent
  I'd be surprised...)

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.

			regards, tom lane

In response to


pgsql-hackers by date

Next:From: Joe ConwayDate: 2005-12-03 00:40:47
Subject: Re: strange behavior (corruption?) of large production
Previous:From: Philip WarnerDate: 2005-12-03 00:35:04
Subject: Re: Optimizer oddness, possibly compounded in 8.1

pgsql-patches by date

Next:From: Atsushi OgawaDate: 2005-12-03 01:42:50
Subject: Re: Allow an alias for the target table in UPDATE/DELETE
Previous:From: Tom LaneDate: 2005-12-02 23:38:01
Subject: Re: Numeric 508 datatype

pgsql-general by date

Next:From: Jim C. NasbyDate: 2005-12-03 02:22:57
Subject: Re: 8.1, OID's and plpgsql
Previous:From: Tom LaneDate: 2005-12-02 23:58:39
Subject: Re: 8.1, OID's and plpgsql

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