Pavel, my apologies for not getting back to you sooner.
On Wed, 2007-25-04 at 07:12 +0200, Pavel Stehule wrote:
> example: I have table with attr. cust_id, and I want to use parametrized
> view (table function) where I want to have attr cust_id on output.
Hmm, I see your point. I'm personally satisfied with adding a new
proargmode to solve this as you suggest.
> RETURN TABLE is specified in std, and it's last statement.
Where is RETURN TABLE defined in the standard? The only reference to
TABLE I can see is as a <multiset value constructor> (section 6.39 in
the current SQL 200n draft). That would allow RETURN TABLE(...), but it
would also allow TABLE(...) to be used in other contexts. I think
the right place to implement TABLE(...) per the spec would be in the
backend, as part of an implementation of the standard's multiset
concept.
Therefore, we probably should *not* use RETURN TABLE in PL/PgSQL, since
it would induce confusion if we ever do a proper multiset
implementation.
-Neil