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 F0C2152879 for ; Tue, 24 May 2005 09:05:51 -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 05438-07 for ; Tue, 24 May 2005 12:05:42 +0000 (GMT) Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by svr1.postgresql.org (Postfix) with SMTP id AF291528B6 for ; Tue, 24 May 2005 09:05:38 -0300 (ADT) Received: (qmail 16298 invoked from network); 24 May 2005 12:04:02 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.2?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 24 May 2005 12:04:02 -0000 Message-ID: <42931890.4020106@fastcrypt.com> Date: Tue, 24 May 2005 08:05:36 -0400 From: Dave Cramer Reply-To: pg@fastcrypt.com Organization: PostgreSQL International User-Agent: Mozilla Thunderbird 1.0.2 (Macintosh/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: List Subject: callable statement with in/out params 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.027 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200505/94 X-Sequence-Number: 12925 I've been looking at modifying the driver to handle IN/OUT params (among other things) Here is the problem: Internally the driver parses the statement and builds arrays of prospective parameters which are by default IN parameters. Now the way callable statement works is that parameters are registered AFTER the statment is created, and some of the IN parameters become OUT parameters, which are not sent to the backend So if you define a function create function foo( out arg1 int, out arg2 int, out arg3 int ) and the statement is "{call foo(?,?,?) }" we want to send "select * from foo() as result" to the backend. So far I've modified SimpleParameterList to have separate in/out lists. However I've run into a wall with the way the query is built after that. As it has been broken up into parts and then is later rebuilt using the parameters. However it assumes that all of the parts of the query will be sent, and in this case they won't. Another set of eyes on this would help greatly. -- Dave Cramer http://www.postgresintl.com 519 939 0336 ICQ#14675561