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 4C6C652818 for ; Tue, 19 Jul 2005 11:03: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 37210-08 for ; Tue, 19 Jul 2005 14:03:18 +0000 (GMT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [203.79.85.162]) by svr1.postgresql.org (Postfix) with ESMTP id D426452940 for ; Tue, 19 Jul 2005 11:03:17 -0300 (ADT) Received: from 203-79-104-60.cable.paradise.net.nz ([203.79.104.60] helo=[192.168.0.21]) by yass.opencloud.co.nz with asmtp (TLS-1.0:DHE_RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1Dusgm-0004qX-4x; Wed, 20 Jul 2005 02:03:16 +1200 Message-ID: <42DD0824.9060002@opencloud.com> Date: Tue, 19 Jul 2005 14:03:16 +0000 From: Oliver Jowett User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tom Lane Cc: Dave Cramer , Christian Cryder , pgsql-jdbc@postgresql.org Subject: Re: Timestamp Conversion Woes Redux 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> <23396.1121781259@sss.pgh.pa.us> In-Reply-To: <23396.1121781259@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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/133 X-Sequence-Number: 13281 Tom Lane wrote: > 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. The main thing I'm worried about there is that if there are cases where an UNKNOWN parameter will generate an error rather than resolve to TEXT, then the driver has just backed the user into a corner they can't escape from. Are there any cases where this can happen? (I'm thinking of some of the ambiguous-type problems we ran into when sending nulls as UNKNOWN..) -O