Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 31F012E365B for ; Tue, 22 Jan 2008 13:15:22 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 09744-03-3 for ; Tue, 22 Jan 2008 13:15:18 -0400 (AST) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 5BE2E2E360D for ; Tue, 22 Jan 2008 13:14:34 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id m0MHDXXT003624; Tue, 22 Jan 2008 12:13:33 -0500 (EST) To: Michael Glaesemann cc: Stuart Brooks , pgsql-sql@postgresql.org Subject: Re: TIMESTAMP comparison problem In-reply-to: <794E6600-42A8-41A2-822D-080E19F9F0CC@seespotcode.net> References: <4795A3B0.3010505@cat.co.za> <794E6600-42A8-41A2-822D-080E19F9F0CC@seespotcode.net> Comments: In-reply-to Michael Glaesemann message dated "Tue, 22 Jan 2008 07:42:20 -0500" Date: Tue, 22 Jan 2008 12:13:33 -0500 Message-ID: <3623.1201022013@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/176 X-Sequence-Number: 30029 Michael Glaesemann writes: > Well, you can't get better than microsecond precision with timestamps > in Postgres. And the only way you can rely on that level of precision > is to compile with --enable-integer-datetimes. There is more precision in there, but the output routine won't show it to you. I think the real issue in Stuart's example is that what's being shown as .746349 is actually .7463494 or something like that. Doing an extract(epoch) on the stored values might be instructive. If you don't want to deal with these sorts of issues then yeah, you want integer timestamps. regards, tom lane