Re: BUG #13875: Error explaining query - Mailing list pgsql-bugs

From Smith, Travis
Subject Re: BUG #13875: Error explaining query
Date
Msg-id BY2PR0101MB0840287BED606A6E6CE07028F4C10@BY2PR0101MB0840.prod.exchangelabs.com
Whole thread Raw
In response to Re: BUG #13875: Error explaining query  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #13875: Error explaining query
List pgsql-bugs
HI Tom,

Sounds good.    I would like to help with the self-contained case.    What =
do you need from me?



Thank you,
Travis


-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]=20
Sent: Monday, January 18, 2016 10:18 PM
To: Smith, Travis
Cc: pgsql-bugs@postgresql.org
Subject: Re: [BUGS] BUG #13875: Error explaining query

travis.smith@iriworldwide.com writes:
> =3D# explain select count(1) from (SELECT DISTINCT=20
> "IRI_IT_M_2782_7472_O"."ATTR_VALUE",=20
> "IRI_IT_M_2782_7472_O"."SORT_ORDER",
> "IT_DIM_IRI_7472"."M_2796_KEY", "IT_DIM_IRI_7472"."M_2782_KEY" FROM=20
> "IT_DIM_IRI_7472", "IRI_IT_M_2782_7472_O" WHERE=20
> ("IT_DIM_IRI_7472"."S_848_KEY" =3D 4527492) AND=20
> ("IT_DIM_IRI_7472"."M_2782_KEY" =3D "IRI_IT_M_2782_7472_O"."AVP_KEY")=20
> ORDER BY "IT_DIM_IRI_7472"."M_2796_KEY" ASC,=20
> "IRI_IT_M_2782_7472_O"."SORT_ORDER" ASC,=20
> "IT_DIM_IRI_7472"."M_2782_KEY" ASC  ) t;

> ERROR:  variable not found in subplan target list

What I get is

ERROR:  relation "IT_DIM_IRI_7472" does not exist LINE 4: "IT_DIM_IRI_7472"=
, "IRI_IT_M_2782_7472_O" WHERE
        ^

This does indeed sound like a bug, but without a self-contained test case, =
there's not a lot we can do about it.

            regards, tom lane

pgsql-bugs by date:

Previous
From: "Aaron W. Swenson"
Date:
Subject: Re: BUG #13873: Pg_upgrade problem from 9.4 to 9.5
Next
From: "David G. Johnston"
Date:
Subject: Re: BUG #13875: Error explaining query