Re: BUG #13875: Error explaining query

From: "Smith, Travis" <Travis(dot)Smith(at)IRIWorldwide(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #13875: Error explaining query
Date: 2016-01-20 16:12:00
Message-ID: BY2PR0101MB0840BB30ADD73AF21707C73AF4C20@BY2PR0101MB0840.prod.exchangelabs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Thanks guys. Problem resolved new extension released a few days ago. Sorry to bother.

Travis

From: David G. Johnston [mailto:david(dot)g(dot)johnston(at)gmail(dot)com]
Sent: Tuesday, January 19, 2016 8:35 AM
To: Smith, Travis
Cc: Tom Lane; pgsql-bugs(at)postgresql(dot)org
Subject: Re: [BUGS] BUG #13875: Error explaining query

On Tue, Jan 19, 2016 at 7:22 AM, Smith, Travis <Travis(dot)Smith(at)iriworldwide(dot)com<mailto:Travis(dot)Smith(at)iriworldwide(dot)com>> wrote:
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(at)sss(dot)pgh(dot)pa(dot)us<mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us>]
Sent: Monday, January 18, 2016 10:18 PM
To: Smith, Travis
Cc: pgsql-bugs(at)postgresql(dot)org<mailto:pgsql-bugs(at)postgresql(dot)org>
Subject: Re: [BUGS] BUG #13875: Error explaining query

travis(dot)smith(at)iriworldwide(dot)com<mailto:travis(dot)smith(at)iriworldwide(dot)com> writes:
> =# explain select count(1) from (SELECT DISTINCT
> "IRI_IT_M_2782_7472_O"."ATTR_VALUE",
> "IRI_IT_M_2782_7472_O"."SORT_ORDER",
> "IT_DIM_IRI_7472"."M_2796_KEY", "IT_DIM_IRI_7472"."M_2782_KEY" FROM
> "IT_DIM_IRI_7472", "IRI_IT_M_2782_7472_O" WHERE
> ("IT_DIM_IRI_7472"."S_848_KEY" = 4527492) AND
> ("IT_DIM_IRI_7472"."M_2782_KEY" = "IRI_IT_M_2782_7472_O"."AVP_KEY")
> ORDER BY "IT_DIM_IRI_7472"."M_2796_KEY" ASC,
> "IRI_IT_M_2782_7472_O"."SORT_ORDER" ASC,
> "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
^

​Ideally, something like:

WITH data_cte AS (
​VALUES (), (), (), ...​
)​
SELECT *
FROM data_cte

Where the main select causes the relevant error.

Otherwise a "psql" script file with the various and sundry CREATE TABLE, CREATE INDEX, INSERT, SELECT statements that, when fed into "psql", cause the error.

David J.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message wayne+psql 2016-01-21 05:05:37 BUG #13878: Hot Standby Query Conflict documentation leaves out a potential source of conflict errors
Previous Message John R Pierce 2016-01-20 08:42:48 Re: [HACKERS] Window2012R2: initdb error: "The current directory is invalid."