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 E2A5352A03 for ; Mon, 25 Jul 2005 00:06:37 -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 49168-07 for ; Mon, 25 Jul 2005 03:06:27 +0000 (GMT) Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by svr1.postgresql.org (Postfix) with SMTP id 52623529E6 for ; Mon, 25 Jul 2005 00:06:26 -0300 (ADT) Received: (qmail 25867 invoked from network); 25 Jul 2005 03:06:25 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.2?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 25 Jul 2005 03:06:25 -0000 In-Reply-To: <42E42721.5010606@opencloud.com> References: <42E4158D.3020902@opencloud.com> <14992.1122245290@sss.pgh.pa.us> <42E42721.5010606@opencloud.com> Mime-Version: 1.0 (Apple Message framework v733) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Cc: Tom Lane , "emergency.shower@gmail.com" , pgsql-jdbc@postgresql.org Content-Transfer-Encoding: 7bit From: Dave Cramer Subject: Re: Timestamp weirdness Date: Sun, 24 Jul 2005 23:06:23 -0400 To: Oliver Jowett X-Mailer: Apple Mail (2.733) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.015 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200507/278 X-Sequence-Number: 13426 On 24-Jul-05, at 7:41 PM, Oliver Jowett wrote: > 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. Seems like this is the only way to go for now. +1 from me. > > -O > > ---------------------------(end of > broadcast)--------------------------- > TIP 9: In versions below 8.0, the planner will ignore your desire to > choose an index scan if your joining column's datatypes do not > match > > Dave Cramer davec@postgresintl.com www.postgresintl.com ICQ #14675561 jabber davecramer@jabber.org ph (519 939 0336 )