pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #13875: Error explaining query
9+ messages / 5 participants
[nested] [flat]

* BUG #13875: Error explaining query
@ 2016-01-18 16:05 travis.smith@iriworldwide.com
  2016-01-19 04:17 ` Re: BUG #13875: Error explaining query Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 9+ messages in thread

From: travis.smith@iriworldwide.com @ 2016-01-18 16:05 UTC (permalink / raw)
  To: pgsql-bugs

The following bug has been logged on the website:

Bug reference:      13875
Logged by:          Travis Smith
Email address:      travis.smith@iriworldwide.com
PostgreSQL version: 9.5.0
Operating system:   Linux lnx0409.ch3.prod.i.com 2.6.32-358.el6.x86_64
Description:        

=# 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



-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: BUG #13875: Error explaining query
  2016-01-18 16:05 BUG #13875: Error explaining query travis.smith@iriworldwide.com
@ 2016-01-19 04:17 ` Tom Lane <tgl@sss.pgh.pa.us>
  2016-01-19 04:25   ` Re: BUG #13875: Error explaining query Michael Paquier <michael.paquier@gmail.com>
  2016-01-19 14:22   ` Re: BUG #13875: Error explaining query Smith, Travis <Travis.Smith@IRIWorldwide.com>
  0 siblings, 2 replies; 9+ messages in thread

From: Tom Lane @ 2016-01-19 04:17 UTC (permalink / raw)
  To: travis.smith@iriworldwide.com; +Cc: pgsql-bugs

travis.smith@iriworldwide.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
        ^

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


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: BUG #13875: Error explaining query
  2016-01-18 16:05 BUG #13875: Error explaining query travis.smith@iriworldwide.com
  2016-01-19 04:17 ` Re: BUG #13875: Error explaining query Tom Lane <tgl@sss.pgh.pa.us>
@ 2016-01-19 04:25   ` Michael Paquier <michael.paquier@gmail.com>
  1 sibling, 0 replies; 9+ messages in thread

From: Michael Paquier @ 2016-01-19 04:25 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-bugs

On Tue, Jan 19, 2016 at 1:17 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> This does indeed sound like a bug, but without a self-contained
> test case, there's not a lot we can do about it.

Yeah, I was flattening this test case before you sent this email,
coming with the attached:
create table aa1 (s1 int, m1 int, m2 int);
create table aa2 (key int, attr int, sort int);
explain select count(1) from (SELECT DISTINCT
aa2.attr, aa2.sort,
aa1.m1, aa1.m2 FROM
aa1, aa2 WHERE
(aa1.s1 = 4527492) AND
(aa1.m2 = aa2.key) ORDER BY
aa1.m1 ASC, aa2.sort ASC,
aa1.m2 ASC) t;
But this is proving to work. There is not much doable here without a
self-contained test case...
-- 
Michael


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: BUG #13875: Error explaining query
  2016-01-18 16:05 BUG #13875: Error explaining query travis.smith@iriworldwide.com
  2016-01-19 04:17 ` Re: BUG #13875: Error explaining query Tom Lane <tgl@sss.pgh.pa.us>
@ 2016-01-19 14:22   ` Smith, Travis <Travis.Smith@IRIWorldwide.com>
  2016-01-19 14:34     ` Re: BUG #13875: Error explaining query David G. Johnston <david.g.johnston@gmail.com>
  1 sibling, 1 reply; 9+ messages in thread

From: Smith, Travis @ 2016-01-19 14:22 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: 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] 
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:
> =# 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
        ^

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


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: BUG #13875: Error explaining query
  2016-01-18 16:05 BUG #13875: Error explaining query travis.smith@iriworldwide.com
  2016-01-19 04:17 ` Re: BUG #13875: Error explaining query Tom Lane <tgl@sss.pgh.pa.us>
  2016-01-19 14:22   ` Re: BUG #13875: Error explaining query Smith, Travis <Travis.Smith@IRIWorldwide.com>
@ 2016-01-19 14:34     ` David G. Johnston <david.g.johnston@gmail.com>
  2016-01-19 15:02       ` Re: BUG #13875: Error explaining query Smith, Travis <Travis.Smith@IRIWorldwide.com>
  2016-01-20 16:12       ` Re: BUG #13875: Error explaining query Smith, Travis <Travis.Smith@IRIWorldwide.com>
  0 siblings, 2 replies; 9+ messages in thread

From: David G. Johnston @ 2016-01-19 14:34 UTC (permalink / raw)
  To: Smith, Travis <Travis.Smith@iriworldwide.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-bugs

On Tue, Jan 19, 2016 at 7:22 AM, Smith, Travis <
Travis.Smith@iriworldwide.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@sss.pgh.pa.us]
> 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:
> > =# 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.

^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: BUG #13875: Error explaining query
  2016-01-18 16:05 BUG #13875: Error explaining query travis.smith@iriworldwide.com
  2016-01-19 04:17 ` Re: BUG #13875: Error explaining query Tom Lane <tgl@sss.pgh.pa.us>
  2016-01-19 14:22   ` Re: BUG #13875: Error explaining query Smith, Travis <Travis.Smith@IRIWorldwide.com>
  2016-01-19 14:34     ` Re: BUG #13875: Error explaining query David G. Johnston <david.g.johnston@gmail.com>
@ 2016-01-19 15:02       ` Smith, Travis <Travis.Smith@IRIWorldwide.com>
  2016-01-19 17:09         ` Re: BUG #13875: Error explaining query Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 1 reply; 9+ messages in thread

From: Smith, Travis @ 2016-01-19 15:02 UTC (permalink / raw)
  To: David G. Johnston <david.g.johnston@gmail.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-bugs

This table is using the Columnar store extension.  This worked in 9.5 beta like a charm, I upgrade and now this.   I can provide script and data.   Any limit on file sizes?


Thank you,
Travis


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

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

travis.smith@iriworldwide.com<mailto:travis.smith@iriworldwide.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.


^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: BUG #13875: Error explaining query
  2016-01-18 16:05 BUG #13875: Error explaining query travis.smith@iriworldwide.com
  2016-01-19 04:17 ` Re: BUG #13875: Error explaining query Tom Lane <tgl@sss.pgh.pa.us>
  2016-01-19 14:22   ` Re: BUG #13875: Error explaining query Smith, Travis <Travis.Smith@IRIWorldwide.com>
  2016-01-19 14:34     ` Re: BUG #13875: Error explaining query David G. Johnston <david.g.johnston@gmail.com>
  2016-01-19 15:02       ` Re: BUG #13875: Error explaining query Smith, Travis <Travis.Smith@IRIWorldwide.com>
@ 2016-01-19 17:09         ` Tom Lane <tgl@sss.pgh.pa.us>
  2016-01-19 17:10           ` Re: BUG #13875: Error explaining query Smith, Travis <Travis.Smith@IRIWorldwide.com>
  0 siblings, 1 reply; 9+ messages in thread

From: Tom Lane @ 2016-01-19 17:09 UTC (permalink / raw)
  To: Smith, Travis <Travis.Smith@IRIWorldwide.com>; +Cc: David G. Johnston <david.g.johnston@gmail.com>; pgsql-bugs

"Smith, Travis" <Travis.Smith@IRIWorldwide.com> writes:
> This table is using the Columnar store extension.

Oh.  In that case, the very first thing you should do is inquire whether
that extension is known compatible with 9.5.0.  Better yet, try to
reproduce the problem without that extension.

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: BUG #13875: Error explaining query
  2016-01-18 16:05 BUG #13875: Error explaining query travis.smith@iriworldwide.com
  2016-01-19 04:17 ` Re: BUG #13875: Error explaining query Tom Lane <tgl@sss.pgh.pa.us>
  2016-01-19 14:22   ` Re: BUG #13875: Error explaining query Smith, Travis <Travis.Smith@IRIWorldwide.com>
  2016-01-19 14:34     ` Re: BUG #13875: Error explaining query David G. Johnston <david.g.johnston@gmail.com>
  2016-01-19 15:02       ` Re: BUG #13875: Error explaining query Smith, Travis <Travis.Smith@IRIWorldwide.com>
  2016-01-19 17:09         ` Re: BUG #13875: Error explaining query Tom Lane <tgl@sss.pgh.pa.us>
@ 2016-01-19 17:10           ` Smith, Travis <Travis.Smith@IRIWorldwide.com>
  0 siblings, 0 replies; 9+ messages in thread

From: Smith, Travis @ 2016-01-19 17:10 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: David G. Johnston <david.g.johnston@gmail.com>; pgsql-bugs

HI Tom,

I am doing that now.   I was planning a reply, thankfully enough it appears a release was done recently.

Thank you,
Travis


-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us] 
Sent: Tuesday, January 19, 2016 11:09 AM
To: Smith, Travis
Cc: David G. Johnston; pgsql-bugs@postgresql.org
Subject: Re: [BUGS] BUG #13875: Error explaining query

"Smith, Travis" <Travis.Smith@IRIWorldwide.com> writes:
> This table is using the Columnar store extension.

Oh.  In that case, the very first thing you should do is inquire whether that extension is known compatible with 9.5.0.  Better yet, try to reproduce the problem without that extension.

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: BUG #13875: Error explaining query
  2016-01-18 16:05 BUG #13875: Error explaining query travis.smith@iriworldwide.com
  2016-01-19 04:17 ` Re: BUG #13875: Error explaining query Tom Lane <tgl@sss.pgh.pa.us>
  2016-01-19 14:22   ` Re: BUG #13875: Error explaining query Smith, Travis <Travis.Smith@IRIWorldwide.com>
  2016-01-19 14:34     ` Re: BUG #13875: Error explaining query David G. Johnston <david.g.johnston@gmail.com>
@ 2016-01-20 16:12       ` Smith, Travis <Travis.Smith@IRIWorldwide.com>
  1 sibling, 0 replies; 9+ messages in thread

From: Smith, Travis @ 2016-01-20 16:12 UTC (permalink / raw)
  To: David G. Johnston <david.g.johnston@gmail.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-bugs

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


Travis



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

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

travis.smith@iriworldwide.com<mailto:travis.smith@iriworldwide.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.


^ permalink  raw  reply  [nested|flat] 9+ messages in thread


end of thread, other threads:[~2016-01-20 16:12 UTC | newest]

Thread overview: 9+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-01-18 16:05 BUG #13875: Error explaining query travis.smith@iriworldwide.com
2016-01-19 04:17 ` Tom Lane <tgl@sss.pgh.pa.us>
2016-01-19 04:25   ` Michael Paquier <michael.paquier@gmail.com>
2016-01-19 14:22   ` Smith, Travis <Travis.Smith@IRIWorldwide.com>
2016-01-19 14:34     ` David G. Johnston <david.g.johnston@gmail.com>
2016-01-19 15:02       ` Smith, Travis <Travis.Smith@IRIWorldwide.com>
2016-01-19 17:09         ` Tom Lane <tgl@sss.pgh.pa.us>
2016-01-19 17:10           ` Smith, Travis <Travis.Smith@IRIWorldwide.com>
2016-01-20 16:12       ` Smith, Travis <Travis.Smith@IRIWorldwide.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox