Re: PostgreSQL query with FULL OUTER JOIN and subquery using column of GROUP BY expression ERROR: subquery uses ungrouped column from outer query - Mailing list pgsql-general
From
Tom Lane
Subject
Re: PostgreSQL query with FULL OUTER JOIN and subquery using column of GROUP BY expression ERROR: subquery uses ungrouped column from outer query
I wrote:
> "David G. Johnston" <david.g.johnston@gmail.com> writes:
>> My first impression is that this is a bug. Especially since the query
>> apparently executes in both left-join and right-join modes.
> Well, it's a longstanding deficiency anyway.
> ...
> Still, it is annoying. I wonder if there's a way to do it without
> either a large amount of new code or exponential time spent
> trying useless subexpression matches...
I've posted a draft fix for that at
https://www.postgresql.org/message-id/flat/531183.1772058731%40sss.pgh.pa.us
regards, tom lane