Re: Out parameters handling - Mailing list pgsql-hackers

From Gregory Stark
Subject Re: Out parameters handling
Date
Msg-id 878wnh9ruu.fsf@oxford.xeocode.com
Whole thread Raw
In response to Re: Out parameters handling  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Out parameters handling  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> writes:

> Robert Haas <robertmhaas@gmail.com> writes:
>> On Sat, Mar 7, 2009 at 9:08 AM, Rod Taylor <rod.taylor@gmail.com> wrote:
>>> It wouldn't be so bad if you could assign internal and external column names.
>
>> This is a good point.  Uglifying the parameter names is sort of OK for
>> input parameters, but is much more annoying for output parameters.
>
> How much of this pain would go away if we changed over to the arguably
> correct (as in Or*cle does it that way) scoping for names, wherein the
> parser first tries to match a name against column names of tables of the
> current SQL statement, and only failing that looks to see if they are
> plpgsql variables?

I'm not sure that's any better. The case where I've run into this is when I
have something like:
balance := new valueUPDATE tab SET balance = balance

In that case the only way we could get it right is if we default to the local
variable but only in contexts where an expression is valid.


--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com Ask me about EnterpriseDB's 24x7 Postgres support!


pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Out parameters handling
Next
From: Tom Lane
Date:
Subject: Re: Out parameters handling