Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WuCaY-0007OJ-Cl for pgsql-odbc@arkaria.postgresql.org; Tue, 10 Jun 2014 03:19:06 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WuCaX-0004JG-Q1 for pgsql-odbc@arkaria.postgresql.org; Tue, 10 Jun 2014 03:19:05 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1WuCaW-0004J9-MH for pgsql-odbc@postgresql.org; Tue, 10 Jun 2014 03:19:05 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1WuCaS-0002lr-EN for pgsql-odbc@postgresql.org; Tue, 10 Jun 2014 03:19:02 +0000 Received: from compute5.internal (compute5.nyi.mail.srv.osa [10.202.2.45]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 49DBD212D4 for ; Mon, 9 Jun 2014 23:18:58 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute5.internal (MEProxy); Mon, 09 Jun 2014 23:18:58 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=aklaver.com; h= message-id:date:from:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; s=mesmtp; bh=5mBNNPx9GxiPvjfYFPOFyxS7cUk=; b=iO4I+ohwz3jAh+WUpjDtdsRERE36 CVcHtuhhs7RLAHrSD6bVvUsv7bUCCCYdZktiUnMaQ2D3Ycyfg+HDey1RWou8flSV ewV7P8Pxnw5RacYJWMGEVHv/bUUBcZnPsiNt0SphF4nmcuvNpYbXQsgSRW3oXxaY oK4614Kep5ODC9U= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:date:from:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; s=smtpout; bh=5mBNNPx9GxiPvjfYFPOFyx S7cUk=; b=NU5gp/7PBTw1f5c/VzkF0sLm1D3ACSRcAKp17VPuVSVVjQRSXu4jQq A/iZCZp9Hk/YyhDCw/aYyYc9YabyoHC12XDVHEEY/TNGK5frYstkyyntXzv1k/oN beZ5mLQpiDH5YTG18OsB7evo3Il2DLThWUaPvoj71/b0Svy8pYE6o= X-Sasl-enc: Gf2w3hGmVyqZOJuo0HEmDffbrulPGmv6/VsW5xLKwyBg 1402370337 Received: from panda.site (unknown [65.102.186.57]) by mail.messagingengine.com (Postfix) with ESMTPA id AD3E7C00003; Mon, 9 Jun 2014 23:18:57 -0400 (EDT) Message-ID: <53967920.3090308@aklaver.com> Date: Mon, 09 Jun 2014 20:18:56 -0700 From: Adrian Klaver User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: Walter Couto , David G Johnston , "pgsql-odbc@postgresql.org" Subject: Re: Re: Inconsistency between JDBC and ODBC drivers when dealing with TIMESTAMP WITH TIME ZONE References: <7FA4F9E5512F214C801E596ECD8790E066A82A9A@ETNAMAIL01.embarcadero.com>, <1402359526172-5806595.post@n5.nabble.com> <7FA4F9E5512F214C801E596ECD8790E066A82D32@ETNAMAIL01.embarcadero.com> In-Reply-To: <7FA4F9E5512F214C801E596ECD8790E066A82D32@ETNAMAIL01.embarcadero.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-odbc Precedence: bulk Sender: pgsql-odbc-owner@postgresql.org On 06/09/2014 07:49 PM, Walter Couto wrote: > I have to strongly disagree that this is an enhancement. It is a severe bug. In PostgreSQL, if you look at both the JDBC and ODBC source code, for timestamp with time zone, the string that the server gives to the driver for my example is "2002-04-11 02:33:08.12345+3" if the session time zone is set to +3. > > Asking for a timestamp with time zone as a timestamp in either ODBC and JDBC is done knowing you are accepting the lose of time zone info. I have NO issue with this (as a side note the JDBC and ODBC driver did behave the same at one point, in both cases they returned the timestamp in the server time zone, but surprise change in a recent version to correct this to be JDBC spec compliant caused some headaches for some people using the driver as they wrote code assuming this behaviour and now were all wrong). > > I have an issue with the retuned string value from ODBC....the driver got a perfectly fine string, it could have given it to me. There is no sane reason to have the time zone part stripped out before giving it to me. At least with JDBC it gave me an EQUALLY ACCURATE string of "2002-04-10 19:22:08.12345-04", with ODBC I need to run a separate query to get the session time zone to correct the string that was perfectly fine when ODBC was given it. > > Changing the query is nice for internal queries and is a good work around for this bug, but when non-internal queries are given to our application, we can't expect to ask the customers to work around driver bugs and change all their perfectly working queries. I expect the driver to give information as accurately as the server gave to the driver. That is what I am asking here and that is what is not happing in the case of ODBC when asking for the string form of a timestamp with time zone. This is why I see this as a severe bug as the driver is giving me CORRUPT data that is not the same or even equally the same as the data it retrieved from the server that the client tool has to "fix" by issuing another query. You still have not shown what it is you are actually doing. Personally, less rant and more actual code would be useful. You originally asked for a solution and I would like to see that, but at this point there is not enough information to go on, for me at least. So what exactly do you mean when you say 'asking for string form of timestamp with time zone'? > > Regards, > Walter -- Adrian Klaver adrian.klaver@aklaver.com -- Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-odbc