Re: BUG #3459: Query Error : plan should not reference subplan's variable - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #3459: Query Error : plan should not reference subplan's variable
Date
Msg-id 5699.1184704402@sss.pgh.pa.us
Whole thread Raw
In response to BUG #3459: Query Error : plan should not reference subplan's variable  ("David Sanchez i Gregori" <delkos_2000@yahoo.es>)
List pgsql-bugs
"David Sanchez i Gregori" <delkos_2000@yahoo.es> writes:
> select * from(
> select min("ID") as nid from "Seguretat"."Usuarios" as j
> where not exists
> ( select 1 from "Seguretat"."Usuarios" as k where k."ID"=j."ID")
> ) as b

Confirmed here, as far back as 8.1.  It sort of looks like the
indexes-for-min-and-max patch has confused the older code for Param
assignment.  I'm surprised this wasn't reported earlier...

            regards, tom lane

pgsql-bugs by date:

Previous
From: "David Sanchez i Gregori"
Date:
Subject: BUG #3459: Query Error : plan should not reference subplan's variable
Next
From: Bruce Momjian
Date:
Subject: Re: BUG #3431: age() gets the days wrong