bigint integers up to 19 digits. - Mailing list pgsql-performance

From Tory M Blue
Subject bigint integers up to 19 digits.
Date
Msg-id 8a547c841002041015o57d533fdg7237c50dea7a9278@mail.gmail.com
Whole thread Raw
Responses Re: bigint integers up to 19 digits.
Re: bigint integers up to 19 digits.
List pgsql-performance
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

pgsql-performance by date:

Previous
From: Matthew Wakeling
Date:
Subject: Re: Optimizing Postgresql server and FreeBSD for heavy read and writes
Next
From: Craig James
Date:
Subject: Re: bigint integers up to 19 digits.