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 1574552E88 for ; Tue, 26 Jul 2005 11:28:24 -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 23862-04 for ; Tue, 26 Jul 2005 14:28:22 +0000 (GMT) Received: from gwmta.wicourts.gov (gwmta.wicourts.gov [165.219.244.91]) by svr1.postgresql.org (Postfix) with ESMTP id E3A6D52E54 for ; Tue, 26 Jul 2005 11:28:21 -0300 (ADT) Received: from Courts-MTA by gwmta.wicourts.gov with Novell_GroupWise; Tue, 26 Jul 2005 09:28:25 -0500 Message-Id: X-Mailer: Novell GroupWise Internet Agent 6.5.2 Date: Tue, 26 Jul 2005 09:28:10 -0500 From: "Kevin Grittner" To: , Cc: Subject: Re: Timestamp weirdness Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.009 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200507/327 X-Sequence-Number: 13475 This raises two questions for me, as someone trying to become acclimated to the PostgreSQL development community. (1) Is there any long-term goal of making the TIMESTAMP WITH TIME ZONE more compatible with the standard by storing a time zone with the timestamp? (2) What is the general position of the PostgreSQL community regarding the sticky questions of whether to improve compliance with standards versus preserving existing (noncompliant) behavior to avoid breaking existing PostgreSQL-specific application code? Coming from years of working with Sybase databases, I have to say that I appreciate the strategy they use in their JDBC driver. They provide a connection property to specify the version of the to which driver you're coding, and the behavior of existing code never changes (other than clear bug fixes) for a given value of that property. If you want the modified behavior, you change your code to work with it, and change the property to match. It's a little clumsy, because there may be several changes in one new version, and you need to adopt all or none, but it does help. A more refined approach would provide properties to control each individual behavior, and the version number would provide defaults. -Kevin >>> Oliver Jowett 07/25/05 8:12 PM >>> emergency.shower@gmail.com wrote: > If I TIMESTAMP WITH TIME ZONE is implemented on the server as a > (timestamp, time zone)-pair It's not, it's just a timestamp in UTC with no timezone stored. > , the server should be able to cast > TIMESTAMP WITH TIME ZONE correctly to TIMESTAMP WITHOUT TIME ZONE as > described in the SQL standard: > > From TIMESTAMP WITH TIME ZONE to TIMESTAMP WITHOUT TIME ZONE > TargetValue = SourceValue.UTC + SourceValue.TimeZone I'd like to see this too, but Tom doesn't like it for backwards-compatibility reasons.