Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 2D74E9FA032 for ; Sun, 28 Oct 2007 17:44:06 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 17453-09 for ; Sun, 28 Oct 2007 17:43:58 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from tremor.opencloud.co.nz (tremor.opencloud.co.nz [131.203.101.230]) by postgresql.org (Postfix) with ESMTP id CED6C9FA01D for ; Sun, 28 Oct 2007 17:44:00 -0300 (ADT) Received: from 222-154-141-112.jetstream.xtra.co.nz ([222.154.141.112] helo=[10.1.1.3]) by tremor.opencloud.co.nz with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1ImEzF-0003h0-DY; Mon, 29 Oct 2007 09:43:57 +1300 Message-ID: <4724F4A2.1080601@opencloud.com> Date: Mon, 29 Oct 2007 09:44:18 +1300 From: Oliver Jowett User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: cncinfo@126.com CC: pgsql-jdbc@postgresql.org Subject: Re: about function overload,a bug? References: <1193597813.2737.26.camel@happy.letu.com> In-Reply-To: <1193597813.2737.26.camel@happy.letu.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/170 X-Sequence-Number: 17742 cncinfo@126.com wrote: > It seems "timestamp without time zone" is same as "character varying" in > jdbc,so jdbc invoke wrong function. Unfortunately the JDBC driver must pass timestamp parameters without type data and let the server infer the correct type to use (this is necessary to have both "timestamp with time zone" and "timestamp without time zone" operate correctly). In your case the server is inferring the wrong type for what you want. An explicit cast in your query may fix it. -O