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 A8EE6D1B7C1 for ; Fri, 18 Jun 2004 20:40:36 -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 67450-02 for ; Fri, 18 Jun 2004 23:40:35 +0000 (GMT) Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by svr1.postgresql.org (Postfix) with SMTP id 9CB44D1B750 for ; Fri, 18 Jun 2004 20:40:30 -0300 (ADT) Received: (qmail 18212 invoked from network); 18 Jun 2004 23:40:31 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.36?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 18 Jun 2004 23:40:31 -0000 Subject: Re: proposal for CallableStatements to handle multiple out From: Dave Cramer Reply-To: pg@fastcrypt.com To: Oliver Jowett Cc: "pgsql-jdbc@postgresql.org" In-Reply-To: <40D37653.8010302@opencloud.com> References: <1087582419.15586.173.camel@localhost.localdomain> <40D37653.8010302@opencloud.com> Content-Type: text/plain Organization: Cramer Consulting Message-Id: <1087602030.15607.190.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Fri, 18 Jun 2004 19:40:31 -0400 Content-Transfer-Encoding: 7bit X-AntiVirus: scanned for viruses by AMaViS 0.2.1 (http://amavis.org/) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200406/107 X-Sequence-Number: 10309 See Kris's addition. At this point however I've done some work and realized that most of the parsing, binding and rewriting of the queries will need to be encapsulated in two classes, one for regular statements, and one for callable statements. This will allow me to totally encapsulate the logic for this inside the CallableStatement implementations, instead of mucking up the current AbstractJdbc1Statement code. Dave On Fri, 2004-06-18 at 19:10, Oliver Jowett wrote: > Dave Cramer wrote: > > I'm in the process of writing a patch to get the driver to handle > > multiple out parms. > > > > One mechanism is to create a composite type and a function such as: > > > > create type Numeric_Proc_RetType as(it1 numeric(30,15),it2 > > numeric(30,15),it3 numeric(30,15));"); > > > > create function Numeric_Proc(numeric(30,15),numeric(30,15), > > numeric(30,15)) returns Numeric_Proc_RetType as 'declare work_ret > > record; begin select * into work_ret from Numeric_Tab; return work_ret; > > end;' language 'plpgsql'; > > > > > > Are there any problems with this ? > > Could you describe the driver side of your proposal? > > -O > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster > > > > !DSPAM:40d3774e134381905984059! > > -- Dave Cramer 519 939 0336 ICQ # 14675561