Received: from parmastocks2.cylink.com.cy (parmastocks2.cylink.com.cy [194.42.142.6]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f78HMT689885 for ; Wed, 8 Aug 2001 13:22:29 -0400 (EDT) (envelope-from grigoriy.vovk@linustech.com.cy) Received: from [192.168.1.2] (parmastocks.cylink.com.cy [194.42.135.92]) by parmastocks2.cylink.com.cy (Postfix) with ESMTP id ED3BD34080; Wed, 8 Aug 2001 20:18:45 +0300 (EEST) Date: Wed, 8 Aug 2001 20:21:51 +0300 (EEST) From: "Grigoriy G. Vovk" X-X-Sender: To: Josh Berkus Cc: Chris Ruprecht , pgsql Subject: Re: Functions returning more than one value In-Reply-To: Message-ID: <20010808201943.O574-100000@callisto.internal.linustech.com.cy> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200108/133 X-Sequence-Number: 4354 May be, in a far future, will be better to have a stored procedures which will able to accept input arguments and output arguments? Aug 8, 09:26 -0700, Josh Berkus wrote: > Chris, > > > The called function (test2() in the example) will MODIFY the two > > arguments > > and then return a true value. After test2() has run, the value of the > > two > > arguments 'has changed' to what test2() has assigned to them. > > I understand, now. You're trying to replicate the functionality > provided in programming languages using By Reference arguments. > > I could suggest a number of workarounds. However, I think rather that > you should give serious consideration to *not* doing this in PL/pgSQL > but doing it in a full-featured procedural (and/or Object Oriented) > language instead. Java, Python, Perl and even 4GL would provide you > with more robust functionality. > > For example, what you want is easily done in Java just by passing the > input parameters as By Reference. > > Opinions on Middleware languages, anyone? > > -Josh Berkus > > my best regards, ---------------- Grigoriy G. Vovk