Re: proposal for 8.3: Simultaneous assignment for PL/pgSQL - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: proposal for 8.3: Simultaneous assignment for PL/pgSQL
Date
Msg-id 20060807143643.GA26747@svana.org
Whole thread Raw
In response to Re: proposal for 8.3: Simultaneous assignment for PL/pgSQL  ("Pavel Stehule" <pavel.stehule@hotmail.com>)
Responses Re: proposal for 8.3: Simultaneous assignment for PL/pgSQL
List pgsql-hackers
On Mon, Aug 07, 2006 at 04:11:48PM +0200, Pavel Stehule wrote:
> The best of is implementation of CALL statement, where I can transmit
> values "by" references. But it's not possible in Postgres :-(. I can't to
> select unambiguously called procedure. "I can, if I accept SQL Server
> syntax, where caller specify OUT, INOUT, IN flags too". I am unhappy with
> current situation, and I search good solution. Simultaneous assignment  is
> simplest.

Well, you can implement it. After all, the CALL syntax is merely
syntactic sugar. You could (if you wanted to) do the following:

CREATE FUNCTION foo( a TEXT IN, b TEXT INOUT, c TEXT OUT ) as blah...

And in a pl/pgsql function, translate: "CALL foo(a,b,c)"
into "(b,c) = foo(a,b)" internally.

Doesn't seem like that would be too hard.

Have anice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

pgsql-hackers by date:

Previous
From: "Pavel Stehule"
Date:
Subject: Re: proposal for 8.3: Simultaneous assignment for PL/pgSQL
Next
From: Mark Wong
Date:
Subject: AOL Research open-research