From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Rod Taylor <rod(dot)taylor(at)gmail(dot)com> |
Cc: | Josh Berkus <josh(at)agliodbs(dot)com>, Asko Oja <ascoja(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Out parameters handling |
Date: | 2009-03-07 16:11:30 |
Message-ID: | 603c8f070903070811x47b87d2eh78a78020045581de@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sat, Mar 7, 2009 at 9:08 AM, Rod Taylor <rod(dot)taylor(at)gmail(dot)com> wrote:
> 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;
This is a good point. Uglifying the parameter names is sort of OK for
input parameters, but is much more annoying for output parameters.
...Robert
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-03-07 16:32:54 | Re: Out parameters handling |
Previous Message | Rod Taylor | 2009-03-07 14:08:07 | Re: Out parameters handling |