Return-Path: Delivered-To: apmail-db-torque-user-archive@www.apache.org Received: (qmail 94532 invoked from network); 13 Apr 2004 21:46:54 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 13 Apr 2004 21:46:54 -0000 Received: (qmail 73193 invoked by uid 500); 13 Apr 2004 21:46:38 -0000 Delivered-To: apmail-db-torque-user-archive@db.apache.org Received: (qmail 73181 invoked by uid 500); 13 Apr 2004 21:46:38 -0000 Mailing-List: contact torque-user-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Apache Torque Users List" Reply-To: "Apache Torque Users List" Delivered-To: mailing list torque-user@db.apache.org Received: (qmail 73168 invoked from network); 13 Apr 2004 21:46:38 -0000 Received: from unknown (HELO msgdirector4.onetel.net.uk) (212.67.96.160) by daedalus.apache.org with SMTP; 13 Apr 2004 21:46:38 -0000 Received: from bolek.coachhouse (213-78-101-143.friaco.onetel.net.uk [213.78.101.143]) by msgdirector4.onetel.net.uk (Mirapoint Messaging Server MOS 3.3.6-GR) with ESMTP id BNP55934; Tue, 13 Apr 2004 22:46:41 +0100 (BST) Received: (Exim 3.35) #1 (Debian)) protocol: esmtp id 1BDQxx-000472-00 ; Tue, 13 Apr 2004 17:40:53 +0100 Message-ID: <407C1802.9070000@numerixtechnology.de> Date: Tue, 13 Apr 2004 17:40:34 +0100 From: T E Schmitz Reply-To: mail@numerixtechnology.de User-Agent: Mozilla Thunderbird 0.5 (Windows/20040207) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Huang , torque-user@db.apache.org Subject: Re: PostgreSQL TIMESTAMP comparison fails References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hello Daniel, Thank you for your suggestion, this will do the trick for me. Further to yesterday's posting, I would like to add some more details to highlight the problem: If the record was previously inserted via Torque, doDelete's TIMESTAMP comparison will work and therefore delete the record. If, however, the record had been added 'by hand' using the now() function to set the TIMESTAMP, the comparison will fail. It would appear that this is a precision / type incompatibility problem. I presume PostgreSQL now() returns a TIMESTAMP of a greater precision then java.util.Date. I wonder whether a Torque implementation using java.sql.Date might remedy this incongruence. As an aside, I need a further suggestion: Rather than storing the client machine's Date() I want to store the server's current time in the TIMESTAMP attribute. The only way I can think of would be using straight JDBC and the now() function. Best Regards, Tarlika Elisabeth Schmitz Daniel Huang wrote: > A possible workaround for your doDelete(). > > Assuming that obj holds the object you want to delete and no further checks > need to be done before deleting obj, you can call > Peer.doDelete(obj.getPrimaryKey()) > > --------------------------------------------------------------------- To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org For additional commands, e-mail: torque-user-help@db.apache.org