Re: TABLE-function patch vs plpgsql - Mailing list pgsql-hackers

From Tom Lane
Subject Re: TABLE-function patch vs plpgsql
Date
Msg-id 12107.1217350008@sss.pgh.pa.us
Whole thread Raw
In response to Re: TABLE-function patch vs plpgsql  (Hannu Krosing <hannu@krosing.net>)
Responses Re: TABLE-function patch vs plpgsql  (Hannu Krosing <hannu@krosing.net>)
List pgsql-hackers
Hannu Krosing <hannu@krosing.net> writes:
> Why is PROARGMODE_TABLE needed at all ?

Personally I would rather not have it, but Pavel insists it's needed
for standards compliance in PL/PSM, where output TABLE columns are not
supposed to have names visible within the function.

One reason to have it is so we can distinguish the correct way to
reverse-list an output parameter (as OUT or as a table result column).
Although we could equally well solve that with an extra bool column in
pg_proc instead of redefining proargmodes, as long as you're willing to
accept the reasonable restriction that you can't mix the two styles of
declaring output parameters.  In principle PL/PSM could look at such a
bool too, so there's more than one way to do it.

The feeling I had about it was that if we were adding
PROARGMODE_VARIADIC in 8.4 then there wasn't any very strong argument
not to add PROARGMODE_TABLE; any code looking at proargmodes is going
to need updates anyway.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: TABLE-function patch vs plpgsql
Next
From: "Asko Oja"
Date:
Subject: Re: TABLE-function patch vs plpgsql