Re: RETURN QUERY in PL/PgSQL?
От | Neil Conway |
---|---|
Тема | Re: RETURN QUERY in PL/PgSQL? |
Дата | |
Msg-id | 1178218486.18303.31.camel@goldbach обсуждение исходный текст |
Ответ на | Re: RETURN QUERY in PL/PgSQL? ("Pavel Stehule" <pavel.stehule@hotmail.com>) |
Ответы |
Re: RETURN QUERY in PL/PgSQL?
|
Список | pgsql-hackers |
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
В списке pgsql-hackers по дате отправления: