Re: Out parameters handling - Mailing list pgsql-hackers

From Rod Taylor
Subject Re: Out parameters handling
Date
Msg-id 751261b20903070608n5443c865m49e234f421218f50@mail.gmail.com
Whole thread Raw
In response to Re: Out parameters handling  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Out parameters handling  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
It wouldn't be so bad if you could assign internal and external column names.

Within the function you call the column "v_foo" but the caller of the
function receives column "foo" instead.

OUT v_foo varchar AS "foo"


Another alternative is requiring a prefix like plout for the
replacement to occur:

( OUT foo varchar )

BEGIN SELECT foo.somename INTO plout.foo FROM foo WHERE id = 10;
 RETURN NEXT;
 RETURN;
END;


On Sat, Mar 7, 2009 at 8:50 AM, Robert Haas <robertmhaas@gmail.com> wrote:
> On Fri, Mar 6, 2009 at 8:44 PM, Josh Berkus <josh@agliodbs.com> wrote:
>> Robert,
>>
>> Thing is, anybody can institute their own naming convention.  I've long used
>> v_ as a prefix.  Allowing : would save me some keystrokes, but that's about
>> it.
>>
>> --Josh
>
> True... but there doesn't seem to be any shortage of people who are
> annoyed by the current behavior.  Maybe we should all just learn to
> live with it.
>
> ...Robert
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Out parameters handling
Next
From: hugocoolens
Date:
Subject: field with single quote no longer works in 8.3.5