Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 359CC633799 for ; Thu, 4 Feb 2010 14:16:08 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 97526-10 for ; Thu, 4 Feb 2010 18:15:57 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-px0-f194.google.com (mail-px0-f194.google.com [209.85.216.194]) by mail.postgresql.org (Postfix) with ESMTP id 99228632FCB for ; Thu, 4 Feb 2010 14:15:57 -0400 (AST) Received: by pxi32 with SMTP id 32so1165170pxi.15 for ; Thu, 04 Feb 2010 10:15:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=uXFCy/bJ9qe8fqbaDW9RzeagyLryDEz1Fx1fLfbtgYA=; b=UcL5z8RYzhed9EGyL89yTjTT/ZPBdDP09NCWazYhdwawnyMYvKSAc212UXHZ3LCgz2 BAXEOJcqSAFsU8Tqhjjf/fLRwiJdmY8FjYnmalb/owCEq629He40diYRC1Qajq/F871D tupP/wxac3c1WKJ3eD9mBXK/Bnxk9E+HeOKWs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=TWNszVjS++hNup3t5ad5nj/GGhOsBQMwJQ2LKg6rxXxRBL6CBu2OvW+uMzino5Dl6Y kifr8EtKatnMmD9Yj2g4s7YX7F+r36H7LRmoR1k3tIwP/uObwIwca+RixrsOxbydkpWN h3Fuu8sYkNaiNjAGAki0pfEOZ4RtrRV7r8Wy0= MIME-Version: 1.0 Received: by 10.141.23.17 with SMTP id a17mr975426rvj.157.1265307356347; Thu, 04 Feb 2010 10:15:56 -0800 (PST) Date: Thu, 4 Feb 2010 10:15:56 -0800 Message-ID: <8a547c841002041015o57d533fdg7237c50dea7a9278@mail.gmail.com> Subject: bigint integers up to 19 digits. From: Tory M Blue To: pgsql-performance@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.74 tagged_above=-10 required=5 tests=BAYES_20=-0.74 X-Spam-Level: X-Archive-Number: 201002/88 X-Sequence-Number: 37509 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