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 0087A9FB35F for ; Wed, 30 Aug 2006 21:43:32 -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 75682-05 for ; Thu, 31 Aug 2006 00:43:24 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 1E9C99FB22E for ; Wed, 30 Aug 2006 21:43:22 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from outbound1-fra-R.bigfish.com (outbound-fra.frontbridge.com [62.209.45.174]) by svr4.postgresql.org (Postfix) with ESMTP id 77D545AF8C7 for ; Thu, 31 Aug 2006 00:43:14 +0000 (GMT) Received: from outbound1-fra.bigfish.com (localhost.localdomain [127.0.0.1]) by outbound1-fra-R.bigfish.com (Postfix) with ESMTP id AADA5C95736; Thu, 31 Aug 2006 00:43:11 +0000 (UTC) Received: from mail32-fra-R.bigfish.com (unknown [172.18.18.1]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by outbound1-fra.bigfish.com (Postfix) with ESMTP id A3349C956FA; Thu, 31 Aug 2006 00:43:11 +0000 (UTC) Received: from mail32-fra.bigfish.com (localhost.localdomain [127.0.0.1]) by mail32-fra-R.bigfish.com (Postfix) with ESMTP id 97338606596; Thu, 31 Aug 2006 00:43:11 +0000 (UTC) X-BigFish: V Received: by mail32-fra.bigfish.com (MessageSwitch) id 115698499194607_28720; Thu, 31 Aug 2006 00:43:11 +0000 (UCT) Received: from owa1.spimageworks.com (unknown [160.33.20.31]) by mail32-fra.bigfish.com (Postfix) with ESMTP id B75D9603397; Thu, 31 Aug 2006 00:43:10 +0000 (UTC) Received: from [172.29.105.69] ([172.30.104.3]) by owa1.spimageworks.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 30 Aug 2006 17:43:09 -0700 Message-ID: <44F6309D.7010607@imageworks.com> Date: Wed, 30 Aug 2006 17:43:09 -0700 From: Matt Chambers Reply-To: chambers@imageworks.com Organization: Sony Pictures Imageworks User-Agent: Mozilla Thunderbird 1.0.7-1.4.1.centos4 (X11/20051007) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Dave Cramer Cc: pgsql-jdbc@postgresql.org Subject: Re: jdbc3, pg 8.1.4 , and stored procedures References: <44F61B1B.4030009@imageworks.com> <4FBCA43B-C86C-4FEC-ADE1-DBA8986E1760@fastcrypt.com> In-Reply-To: <4FBCA43B-C86C-4FEC-ADE1-DBA8986E1760@fastcrypt.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 31 Aug 2006 00:43:09.0679 (UTC) FILETIME=[6E7267F0:01C6CC96] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.135 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200608/182 X-Sequence-Number: 15709 Thanks for response. Do you happen to know what 'Malformed function or procedure escape syntax at offset 4' means? That might get me going in the right direction. I will see what I can do about a code example.. There are a couple layers of abstraction and some casting I would want to put into the example. One thing I noticed was that when using the 7.4 driver, while it did work, would say "idle in transaction" next to the process. Also, what I said about every stored procedure, turns out that is false. It seems the ones that don't work are the ones that return cursors. That code looks something like this. Looks like its abstracted to handle normal queries and stored procedure calls. ob_is_call is set to true if they are calling a stored procedure, false if its a normal query. The SQLCleaner handles close() stuff. public Tresult query ( PreparedStatement x_stmt, Tparam x_param ) throws SQLException { ResultSet x_rset = null; if ( ob_is_call ) { ((CallableStatement) x_stmt).registerOutParameter( 1, Types.OTHER ); x_stmt.setObject ( 2, x_param ); x_stmt.execute (); x_rset = (ResultSet) ((CallableStatement) x_stmt).getObject(1); } else { x_stmt.setObject ( 1, x_param ); x_rset = x_stmt.executeQuery (); } try { return handle ( x_rset ); } finally { SqlCleaner.cleanUpSqlSession ( x_rset ); } } -Matt Dave Cramer wrote: > Matt, > > That's pretty strange, the test suite in the driver uses exactly the > same syntax. > > Can you send a self contained test that fails ? > > Dave > On 30-Aug-06, at 7:11 PM, Matt Chambers wrote: > >> Greetings. I've inherited this Tomcat / Postgres application and I'm >> having a problem, not sure what is. Basically, its a postgres 8.1.4 >> server and a tomcat application. All of the SQL is done in plpgsql, >> which is called with prepareCall statements, example: >> >> "{ ? = call getDispatchList ( ? ) }" >> >> With the 7.4 driver it works, with the 8.1 driver every query fails with: >> >> WARNING: Caught unexpected: org.postgresql.util.PSQLException: >> Malformed function or procedure escape syntax at offset 4., >> org.postgresql.util.PSQLException: Malformed function or procedure >> escape syntax at offset 4. >> >> I've been able to move the other applications over to the 8.1 driver >> (none use stored procedures) no problem. What is the secret? >