Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 1A8319FB929 for ; Fri, 13 Apr 2007 17:13:33 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 62366-07 for ; Fri, 13 Apr 2007 17:13:29 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from mir3-fs.mir3.com (mail.mir3.com [65.208.188.100]) by postgresql.org (Postfix) with ESMTP id 39F759FB8CA for ; Fri, 13 Apr 2007 17:13:28 -0300 (ADT) Received: MIR3-FS.mir3.com 172.16.1.11 from 172.16.2.68 172.16.2.68 via HTTP with MS-WebStorage 6.0.6249 Received: from archimedes by MIR3-FS.mir3.com; 13 Apr 2007 13:13:27 -0700 Subject: Re: What changed? From: Mark Lewis To: Paul Tomblin Cc: pgsql-jdbc@postgresql.org In-Reply-To: <20070413193355.GA13445@allhats.xcski.com> References: <20070413184748.GA6562@allhats.xcski.com> <1176491774.8630.101.camel@archimedes> <20070413193355.GA13445@allhats.xcski.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: MIR3, Inc. Date: Fri, 13 Apr 2007 13:13:26 -0700 Message-Id: <1176495206.8630.113.camel@archimedes> Mime-Version: 1.0 X-Mailer: Evolution 2.8.1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/38 X-Sequence-Number: 16887 On Fri, 2007-04-13 at 15:33 -0400, Paul Tomblin wrote: > Quoting Mark Lewis (mark.lewis@mir3.com): > > This is addressed in the FAQ, look at the section titled, "I upgraded > > from 7.x to 8.x. Why did my application break?" > > > > http://jdbc.postgresql.org/documentation/faq.html#upgradeTo80 > > Except neither of the two categories documented there apply to me. The > problem I'm having is that I'm calling either > stmt.setNull(p, java.sql.Types.TIMESTAMP); > or > stmt.setTimestamp(p, startDBDate); > and it's staying that it can't tell the type, in spite of the fact that I > do specify it in both cases. Sorry, guess I was reading a little too quickly the first time around :) More recent versions of the driver send UNSPECIFIED for timestamps (except in the setNull case where they always send TIMESTAMPTZ, but I don't think that matters), which allows the server to "do the right thing" most of the time. I don't have time to really dig into it right now but I'm guessing that you're hitting a case where it fails to do the right thing. -- Mark