From: Tory M Blue <tmblue@gmail.com>
To: pgsql-performance@postgresql.org
Subject: bigint integers up to 19 digits.
Date: Thu, 4 Feb 2010 10:15:56 -0800
Message-ID: <8a547c841002041015o57d533fdg7237c50dea7a9278@mail.gmail.com> (raw)
Greetings,
I have a column that is a bigint that needs to store integers up to 19
digits long. For the most part this works but we sometimes have
numbers that are greater than 9223372036854775807.
I was thinking of changing this to a real or double precision field,
but read in the docs that the value stored is not always the value
inserted. From the docs " Inexact means that some values cannot be
converted exactly to the internal format and are stored as
approximations, so that storing and printing back out a value may show
slight discrepancies".
Is it known what level of precision is provided by the double data
type. My number will always be 19 digits long and always an integer.
I looked into the numeric data type, but the docs say that it can be slow.
Any feedback would be appreciated.
Thanks
Tory
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: tmblue@gmail.com
Subject: Re: bigint integers up to 19 digits.
In-Reply-To: <8a547c841002041015o57d533fdg7237c50dea7a9278@mail.gmail.com>
References: <8a547c841002041015o57d533fdg7237c50dea7a9278@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox