From: | Jeff Davis <pgsql(at)j-davis(dot)com> |
---|---|
To: | David Fetter <david(at)fetter(dot)org> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Steve Prentice <prentice(at)cisco(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: PATCH: make plpgsql IN args mutable (v1) |
Date: | 2009-07-31 01:39:24 |
Message-ID: | 1249004364.709.3.camel@monkey-cat.sm.truviso.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, 2009-07-30 at 17:40 -0700, David Fetter wrote:
> > > This patch changes plpgsql IN parameters so they are mutable. Previously,
> > > they were being forced constant. This patch modifies the plpgsql.sql
> > > regression test and corresponding .out file. The regression test also makes
> > > sure the passed in parameter does not get changed in the calling function.
>
> Wouldn't INOUT parameters cover this case?
That was my first, thought, but I don't think it solves his concern. The
out parameters are returned as part of a record, but he actually wants
to mutate the value passed in.
If mutable IN parameters were allowed, I don't even think it could be
allowable to call them from the SQL level, you could only from another
function.
For instance, what would it mean if you did something like:
SELECT foo(a) FROM mytable;
Where foo() mutated it's IN argument? Would that really be an UPDATE?
Regards,
Jeff Davis
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2009-07-31 01:45:36 | Re: PATCH: make plpgsql IN args mutable (v1) |
Previous Message | David Fetter | 2009-07-31 00:40:58 | Re: PATCH: make plpgsql IN args mutable (v1) |