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 A1BE352B5E for ; Sun, 24 Jul 2005 20:41:23 -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 00952-08 for ; Sun, 24 Jul 2005 23:41:21 +0000 (GMT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [203.79.85.162]) by svr1.postgresql.org (Postfix) with ESMTP id 8AB8852AFD for ; Sun, 24 Jul 2005 20:41:20 -0300 (ADT) Received: from 203-79-104-60.cable.paradise.net.nz ([203.79.104.60] helo=[192.168.0.20]) by yass.opencloud.co.nz with asmtp (TLS-1.0:DHE_RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1Dwq5x-0004Vl-DD; Mon, 25 Jul 2005 11:41:21 +1200 Message-ID: <42E42721.5010606@opencloud.com> Date: Mon, 25 Jul 2005 11:41:21 +1200 From: Oliver Jowett User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050324) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tom Lane Cc: "emergency.shower@gmail.com" , pgsql-jdbc@postgresql.org Subject: Re: Timestamp weirdness References: <42E4158D.3020902@opencloud.com> <14992.1122245290@sss.pgh.pa.us> In-Reply-To: <14992.1122245290@sss.pgh.pa.us> X-Enigmail-Version: 0.90.2.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.007 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200507/277 X-Sequence-Number: 13425 Tom Lane wrote: >>emergency.shower@gmail.com wrote: >> >>>4) When reading from a TIMESTAMP WITH TIME ZONE field, the driver >>>should create a Timestamp by interpreting the y, M, d, H, m, s values >>>as UTC timestamp fields. The Calendar, if given, should be ignored. > Surely 4 should read "by interpreting the y...s values as a timestamp > in the zone specified as part of the value", not as necessarily UTC. Yes, you're right. > The difficulty with both 2 and 3 is that the driver has no very good way > of knowing whether it's writing to a timestamp with tz or one without. > We can know the parameter datatype we send, but if that gets converted > to the other type within the server, you're going to get burnt. I'm leaning towards using UNKNOWN as the least-bad option for now, plus some extension mechanism so you can override it if the type inference does go wrong. Hopefully that should make the commonly-used cases work without applications needing to do anything weird. -O