On Wed, Aug 22, 2012 at 8:04 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Chris Travers <chris(at)metatrontech(dot)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
>> 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.
Yeah, that was my point. I don't know if it is worth fixing but
always better to report.
> Beyond that, though, using a SRF in the target list this way is a bad
> idea because the semantics are very ill-defined.
Yeah. It looks like when you pair it with a general set in a from
clause you get an implicit cross join.
I have been avoiding it because I don't like implicit cross joins.
I will be following the LATERAL feature with interest. Thanks for that.
In response to
pgsql-bugs by date
|Next:||From: Kevin Grittner||Date: 2012-08-22 15:34:09|
|Subject: Re: additional message to the bug #7499|
|Previous:||From: Tom Lane||Date: 2012-08-22 15:04:39|
|Subject: Re: GROUP BY checks inadequate when set returning functions in column list|