X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 18DDE52894 for ; Tue, 24 May 2005 16:22:10 -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 01482-05 for ; Tue, 24 May 2005 19:21:59 +0000 (GMT) Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by svr1.postgresql.org (Postfix) with SMTP id AC65652867 for ; Tue, 24 May 2005 16:21:58 -0300 (ADT) Received: (qmail 23037 invoked from network); 24 May 2005 19:20:20 -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 19:20:20 -0000 Message-ID: <42937ED2.1030902@fastcrypt.com> Date: Tue, 24 May 2005 15:21:54 -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: Tom Lane Cc: PostgreSQL-development Subject: Re: IN/OUT parameters References: <42936EF8.7000703@fastcrypt.com> <4829.1116961439@sss.pgh.pa.us> In-Reply-To: <4829.1116961439@sss.pgh.pa.us> 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.026 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200505/1352 X-Sequence-Number: 68228 At this point I'd just like the backend to ignore the OUT parameter if it were set that way, but allow it to be sent. If you consider that a function could have for arguments sake 10 parameters, and they can be ordered in any fashion; clients have to essentially parse out the OUT parameters and not send them. So you have an incoming client call with 10 parameters but some number less than or equal to get sent to the backend. At this point I'm leaning towards just using IN, or INOUT params, as jdbc has a register outparam, and this could be bound to null if were not explicitly set. Dave Tom Lane wrote: >Dave Cramer writes: > > >>create function foo( out p1 int, in p2 int, out p3 int) .... >>then a subsequent >> >> > > > >>"{call = select foo(?,?,?)} >> >> > > > >>This would need to be currently transformed into select foo(?), with the >>other two being discarded. >> >> > > > >>It seems to me that the bind message needs to support the notion of >>direction in order for this to work cleanly. >> >> > >How would it help for BIND to incorporate direction? What would it even >*mean* for BIND to incorporate direction --- it's a client-to-server >message, and can hardly be expected to transmit data in the reverse >direction. > > regards, tom lane > > > > -- Dave Cramer http://www.postgresintl.com 519 939 0336 ICQ#14675561