X-Original-To: pgsql-jdbc-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 06ACB9FB2F1 for ; Tue, 22 Aug 2006 20:48:12 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 07978-06 for ; Tue, 22 Aug 2006 23:47:55 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [131.203.101.226]) by postgresql.org (Postfix) with ESMTP id A8EFF9FB2C0 for ; Tue, 22 Aug 2006 20:47:53 -0300 (ADT) Received: from 203-118-178-246.bliink.ihug.co.nz ([203.118.178.246] helo=[10.1.1.6]) by yass.opencloud.co.nz with asmtp (TLS-1.0:DHE_RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1GFfyH-0006WP-OP; Wed, 23 Aug 2006 11:47:50 +1200 Message-ID: <44EB97A4.2030308@opencloud.com> Date: Wed, 23 Aug 2006 11:47:48 +1200 From: Oliver Jowett User-Agent: Mozilla Thunderbird 1.0.8 (X11/20060502) X-Accept-Language: en-us, en MIME-Version: 1.0 To: David Gagnon CC: pgsql-jdbc@postgresql.org Subject: Re: question regarding upgrade from pg74.215.jdbc3.jar to References: <44EB8213.2090303@siunik.com> In-Reply-To: <44EB8213.2090303@siunik.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=3.816 tagged_above=0 required=5 tests=SPF_HELO_SOFTFAIL, SPF_SOFTFAIL X-Spam-Level: *** X-Archive-Number: 200608/99 X-Sequence-Number: 15626 David Gagnon wrote: > CREATE OR REPLACE FUNCTION usp_Comptabilite_AgeDeCompteClient(VARCHAR, > VARCHAR, DATE, BOOLEAN, BOOLEAN, INT, VARCHAR) RETURNS refcursor AS $$ > 2006-08-22 18:04:27 ERROR: function > usp_comptabilite_agedecompteclient(character varying, character varying, > "unknown", boolean, boolean, character varying, "unknown") does not exist > 2006-08-22 18:04:27 HINT: No function matches the given name and > argument types. You may need to add explicit type casts. The problem is with parameter 7. This is expecting an INT, but you are giving it a VARCHAR. You are probably calling setString(7, "0"). If you use setInt(7,0) or setObject(7,"0",Types.INTEGER) it should work. > If I execute the statement on pgAdminIII it works: select * from > usp_Comptabilite_AgeDeCompteClient('M', NULL, '2006-08-22', > true, true, '0', NULL) ; Try it in pgAdmin using PREPARE and you should see the same error. > P.S.: I traced with the debugger and I do call setDate for arg $3. I > don't understand why it's still unknow ? It's because the driver doesn't know whether it is a timestamp or a timestamptz, and if we explicitly specify a type that doesn't match the actual type then the server will mangle the value while casting. However, it's not that parameter which is causing your problem. -O