X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 6D9FCD1B2D9 for ; Thu, 1 Jul 2004 21:31:01 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 87679-06 for ; Fri, 2 Jul 2004 00:31:03 +0000 (GMT) Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by svr1.postgresql.org (Postfix) with SMTP id 6EFF4D1B26D for ; Thu, 1 Jul 2004 21:30:57 -0300 (ADT) Received: (qmail 23342 invoked from network); 2 Jul 2004 00:30:32 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.36?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 2 Jul 2004 00:30:32 -0000 Subject: Re: Issue with now() within a transaction in From: Dave Cramer Reply-To: pg@fastcrypt.com To: thebfh@toolsmythe.com Cc: "pgsql-jdbc@postgresql.org" In-Reply-To: References: Content-Type: text/plain Organization: Cramer Consulting Message-Id: <1088728236.1532.71.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Thu, 01 Jul 2004 20:30:36 -0400 Content-Transfer-Encoding: 7bit X-AntiVirus: scanned for viruses by AMaViS 0.2.1 (http://amavis.org/) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=2.8 tagged_above=0.0 required=5.0 tests=BANG_QUOTE X-Spam-Level: ** X-Archive-Number: 200407/6 X-Sequence-Number: 10390 this has nothing to do with jdbc, it is more to do with the way now() is determined. From your explanation it is determined at the end of the transaction, or when the transaction is committed. Dave On Thu, 2004-07-01 at 17:47, John Pagakis wrote: > Most of my tables have a last update date and during some testing in > Postgres 7.4.1 I noticed that the last_update date was slightly in the past > for anything updated within a transaction. The amount it is off by seems to > vary: as little as 30 seconds; as much as a couple of minutes. > > Tables updated outside of a transaction seem to have an accurate timestamp. > If I setAutoCommit(true) instead of setAutoCommit(false) and comment out my > commit/rollbacks, the timestamp is accurate. Within a transaction, it is as > though I have set the WayBack machine for a random trip 1/2 - 2 minutes back > in time. > > I am using pg74.213.jdbc.jar. Is there a more current driver? > > Has anyone else noticed this? Is anyone looking at it? > > __________________________________________________________________ > John Pagakis > Email: ih8spam_thebfh@toolsmythe.com > remove the ih8spam_ and you'll find me > > "I don't know the meaning of the word > surrender! I mean I know it, I'm not > dumb, just not in this context." > -- The Tick > > This signature generated by > ... and I Quote!!(tm) Copyright (c) 1999 SpaZmodic Frog Software, Inc. > www.spazmodicfrog.com > > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org > -- Dave Cramer 519 939 0336 ICQ # 14675561