From: | Neil Conway <neilc(at)samurai(dot)com> |
---|---|
To: | Pavel Stehule <pavel(dot)stehule(at)hotmail(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org, andrew(at)dunslane(dot)net, tgl(at)sss(dot)pgh(dot)pa(dot)us, josh(at)agliodbs(dot)com |
Subject: | Re: RETURN QUERY in PL/PgSQL? |
Date: | 2007-05-03 18:54:46 |
Message-ID: | 1178218486.18303.31.camel@goldbach |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-05-03 19:04:07 | Re: RETURN QUERY in PL/PgSQL? |
Previous Message | Heikki Linnakangas | 2007-05-03 18:27:51 | Re: Sequential scans |