Re: Set generating functions and subqueries
От | Tom Lane |
---|---|
Тема | Re: Set generating functions and subqueries |
Дата | |
Msg-id | 7169.1142261859@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Set generating functions and subqueries (Markus Schaber <schabi@logix-tt.com>) |
Список | pgsql-sql |
Markus Schaber <schabi@logix-tt.com> writes: > Tom Lane wrote: >> The fact that the other form is even allowed is more of a holdover from >> PostQUEL than something we have consciously decided is a good idea. >> (IMHO it's actually a fairly *bad* idea, because it does not work nicely >> when there's more than one SRF in the same targetlist.) It'll probably >> get phased out someday, if we can find a way to replace the >> functionality. I seem to recall speculating that SQL2003's LATERAL >> tables might do the job. > AFAICS, it can be replaced with JOINs: Not really; the case where joins don't help is where you want to generate the SRF's output for each of the values appearing in a table. There's an example in "SQL Functions Returning Sets" in the manual: http://www.postgresql.org/docs/8.1/static/xfunc-sql.html#AEN31646 regards, tom lane
В списке pgsql-sql по дате отправления: