Re: INOUT parameters in procedures

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: INOUT parameters in procedures
Date: 2018-03-05 18:38:39
Message-ID: c56d3db6-ac51-efd0-9c8c-8bedbf02d36b@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 3/5/18 11:00, Pavel Stehule wrote:
> I am looking on attached code, and it looks pretty well. Can be really
> nice if this code will be part of release 11, because it is very
> interesting, important feature feature.

Here is an updated patch, rebased on top of several recent changes, also
added more documentation and tests in other PLs.

> p.s. can be nice, if we allow same trick with calling of OUT variables
> functions in plpgsql
>
> fx(in a, out x, out y) return int -- but requires some special mark
>
> do $$
> declare x int, y int, z int;
> begin
>   z := fx(10, x, y);
>   raise notice '% ....
>
> Then migration from Oracle can be really easy and friendly

This would require some changes to how routines are looked up, because
we currently ignore OUT parameters there. That code does not exist yet.
But it's certainly a plausible extension for the future.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment Content-Type Size
v2-0001-Support-INOUT-parameters-in-procedures.patch text/plain 33.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2018-03-05 18:41:51 Re: INOUT parameters in procedures
Previous Message Tomas Vondra 2018-03-05 18:22:47 Re: STATISTICS retained in CREATE TABLE ... LIKE (INCLUDING ALL)?