Chris Travers <ch...@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 -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs