X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 88F40DBBAD for ; Thu, 24 Nov 2005 01:36:29 -0400 (AST) 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 49707-10 for ; Thu, 24 Nov 2005 05:36:28 +0000 (GMT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [131.203.101.226]) by svr1.postgresql.org (Postfix) with ESMTP id E8CF0DBB96 for ; Thu, 24 Nov 2005 01:36:26 -0400 (AST) Received: from 203-79-104-60.cable.paradise.net.nz ([203.79.104.60] helo=[192.168.0.20]) by yass.opencloud.co.nz with asmtp (TLS-1.0:DHE_RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1Ef9mT-0006sp-D8; Thu, 24 Nov 2005 18:36:25 +1300 Message-ID: <43855158.7050100@opencloud.com> Date: Thu, 24 Nov 2005 18:36:24 +1300 From: Oliver Jowett User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051009) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org CC: Dave Cramer , Kris Jurka Subject: Re: Can PostgreSQL do data type automated casting in References: <200511211718.26679.xinxincute@gmail.com> <1132616246.4154.10.camel@archimedes> <6F909ADC-23ED-40CF-A2B5-41DE61606A26@fastcrypt.com> <438548DB.8070407@opencloud.com> In-Reply-To: <438548DB.8070407@opencloud.com> 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, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200511/188 X-Sequence-Number: 14286 Oliver Jowett wrote: > I guess that we should tighten the checks in the query executor so that > it will only consider types "compatible enough" if the new value is both > of unspecified type *and* null? With that change the test just fails differently: ERROR: could not determine data type of parameter $1 since the test query ("SELECT ?") is actually one of the cases where string-as-unspecified-type does not work. I changed it to use a different query that still appears to exercise the type-changing behaviour correctly ("SELECT CAST (? AS TEXT)") but doesn't fail with a parameter of unspecified type. -O