Re: GROUP BY checks inadequate when set returning functions in column list
От | Tom Lane |
---|---|
Тема | Re: GROUP BY checks inadequate when set returning functions in column list |
Дата | |
Msg-id | 15650.1345647879@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | GROUP BY checks inadequate when set returning functions in column list (Chris Travers <chris@metatrontech.com>) |
Ответы |
Re: GROUP BY checks inadequate when set returning functions in
column list
|
Список | pgsql-bugs |
Chris Travers <chris@metatrontech.com> writes: > It's when we add group by that things appear broken. Note it starts > returning 196 (14 x 14) records, which suggests a cross join against > itself. > mtech_test=# explain analyze select (account_heading__list()).* group by accno > mtech_test-# ; Hm, that really ought to throw an error, since you have ungrouped columns in the result. Not sure why it doesn't. Beyond that, though, using a SRF in the target list this way is a bad idea because the semantics are very ill-defined. Stick to using it in FROM. (The upcoming LATERAL feature will remove the functional limitations associated with that, so we're very unlikely to do anything towards changing the existing behavior of SRFs-in-target-lists, no matter how wacko they might appear.) regards, tom lane
В списке pgsql-bugs по дате отправления: