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 C41A952EAC for ; Tue, 26 Jul 2005 15:06:26 -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 02423-06 for ; Tue, 26 Jul 2005 18:06:19 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id AF88652E92 for ; Tue, 26 Jul 2005 15:06:18 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j6QI6DHM017145; Tue, 26 Jul 2005 14:06:13 -0400 (EDT) To: "Kevin Grittner" Cc: oliver@opencloud.com, emergency.shower@gmail.com, pgsql-jdbc@postgresql.org Subject: Re: Timestamp weirdness In-reply-to: References: Comments: In-reply-to "Kevin Grittner" message dated "Tue, 26 Jul 2005 12:51:03 -0500" Date: Tue, 26 Jul 2005 14:06:13 -0400 Message-ID: <17144.1122401173@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200507/332 X-Sequence-Number: 13480 "Kevin Grittner" writes: > You're saying that a timestampz read from the protocol stream on the > server side is always parsed into a TIMESTAMP WITH TIME ZONE. When it > is assigned to a TIMESTAMP WITHOUT TIME ZONE, there is a cast. No, he's not saying that. He's saying that *if* the server initially converts to timestamptz and then timestamp, there's a problem. It won't ordinarily do that unless told to ... but sending the parameter explicitly typed as timestamptz tells it to. So part of the problem here is that the driver is sending all Timestamp parameters explicitly typed as timestamptz, which it does because it hasn't got any very good basis for knowing whether the value is going to be assigned to a timestamptz or plain timestamp column. regards, tom lane