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 8700E5297E for ; Tue, 19 Jul 2005 10:54:41 -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 36055-03 for ; Tue, 19 Jul 2005 13:54:31 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 5FA3B52869 for ; Tue, 19 Jul 2005 10:54:30 -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 j6JDsJQJ023397; Tue, 19 Jul 2005 09:54:19 -0400 (EDT) To: Oliver Jowett Cc: Dave Cramer , Christian Cryder , pgsql-jdbc@postgresql.org Subject: Re: Timestamp Conversion Woes Redux In-reply-to: <42DCF0C9.4030501@opencloud.com> References: <90876a9e05071810503606d431@mail.gmail.com> <16335.1121714809@sss.pgh.pa.us> <10C90079-DD0A-43D7-9389-7486803F0AB1@fastcrypt.com> <42DC37AC.5030704@opencloud.com> <42DCF0C9.4030501@opencloud.com> Comments: In-reply-to Oliver Jowett message dated "Tue, 19 Jul 2005 12:23:37 -0000" Date: Tue, 19 Jul 2005 09:54:19 -0400 Message-ID: <23396.1121781259@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/132 X-Sequence-Number: 13280 Oliver Jowett writes: > Dave Cramer wrote: >> I'm also thinking we should use UNKOWN for setString as well, hopefully >> this would reduce the number of upgrade problems people are having when >> they upgrade from 7.x to 8.x > I still think this is a bad idea. I think one main point against using UNKNOWN is that it creates a risk of "could not resolve parameter type" query failures. That's OK for generic setString() cases, since the user can always escape the failure by changing his code to specify the parameter type more clearly. The other argument against UNKNOWN is that the backend might choose an unexpected data type. Again, that doesn't scare me a lot for setString, because the backend's rules for dealing with UNKNOWN are biased in favor of resolving the parameter type as TEXT, which seems perfectly reasonable for setString cases. Unfortunately, both of these considerations speak *against* using UNKNOWN for Timestamp. If the backend rejects the query --- or more likely, makes the wrong datatype choice --- there will be no way for the user to fix it. So I'm in favor of using UNKNOWN for setString, but I think we gotta find another answer for Christian's problem. regards, tom lane