Re: Out parameters handling - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Out parameters handling
Date
Msg-id 603c8f070903070811x47b87d2eh78a78020045581de@mail.gmail.com
Whole thread Raw
In response to Re: Out parameters handling  (Rod Taylor <rod.taylor@gmail.com>)
Responses Re: Out parameters handling
Re: Out parameters handling
List pgsql-hackers
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.
>
> 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


pgsql-hackers by date:

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