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
Date
Msg-id 532251.1772059483@sss.pgh.pa.us
Whole thread Raw
In response to Re: PostgreSQL query with FULL OUTER JOIN and subquery using column of GROUP BY expression ERROR: subquery uses ungrouped column from outer query  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
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



pgsql-general by date:

Previous
From: dmurvihill@gmail.com
Date:
Subject: Re: Recovery Verification
Next
From: Michael Nolan
Date:
Subject: Issue with refreshing materialized view from another system