Re: PATCH: make plpgsql IN args mutable (v1)

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: David Fetter <david(at)fetter(dot)org>, 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:45:36
Message-ID: 4A724CC0.50208@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jeff Davis wrote:
> 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?
>
>
>

No, surely the mutated value will only be visible within the scope of
the function, i.e. it will be a purely local copy that gets altered.

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message James Pye 2009-07-31 03:13:28 Re: xpath not a good replacement for xpath_string
Previous Message Jeff Davis 2009-07-31 01:39:24 Re: PATCH: make plpgsql IN args mutable (v1)