Re: Query with aggregate over subselects fails with ERROR: plan should not reference subplan's variable

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Daniel Grace <dgrace(at)wingsnw(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Query with aggregate over subselects fails with ERROR: plan should not reference subplan's variable
Date: 2009-04-25 00:38:13
Message-ID: 22335.1240619893@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Daniel Grace <dgrace(at)wingsnw(dot)com> writes:
> The following nonsensical query causes PostgreSQL to fail with ERROR: plan
> should not reference subplan's variable. (This was stripped down from an
> 'useful' query that triggered the same bug). First encountered on 8.3.4,
> reproduced on 8.3.7

Hmmm ... I guess something is getting confused about the level of query
nesting. FWIW, you can avoid the bug in these two examples by omitting
the inner "SELECT" keyword, which is useless anyway. Perhaps it is
needed in your real query though ...

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Daniel Grace 2009-04-25 00:58:11 Re: Query with aggregate over subselects fails with ERROR: plan should not reference subplan's variable
Previous Message Daniel Grace 2009-04-25 00:03:54 Query with aggregate over subselects fails with ERROR: plan should not reference subplan's variable