pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #17614: "variable not found in subplan target lists" on grouping query
2+ messages / 2 participants
[nested] [flat]

Commits from this thread:
  2022-09-15 19bb5e46b9 19a00ea56f  In back branches, fix conditions for pullup of FROM-less subqueries.
* BUG #17614: "variable not found in subplan target lists" on grouping query
@ 2022-09-15 12:35  PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 1 reply; 2+ messages in thread

From: PG Bug reporting form @ 2022-09-15 12:35 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: androiddown_weiwei@hotmail.com

The following bug has been logged on the website:

Bug reference:      17614
Logged by:          Wei Wei
Email address:      androiddown_weiwei@hotmail.com
PostgreSQL version: 11.17
Operating system:   Linux ubuntu 5.4.0-125-generic
Description:        

The problem is reproducible with following sql:
```
	SELECT
		sp2.spf_id 
	FROM
		information_schema.sql_parts AS sp
		CROSS JOIN LATERAL ( SELECT sizing_id FROM information_schema.sql_sizing )
AS ss
		CROSS JOIN LATERAL ( SELECT sp.feature_id AS spf_id ) AS sp2
	GROUP BY
		CUBE ( sp2.spf_id )
```
but seems having been fixed since 12.0



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

* Re: BUG #17614: "variable not found in subplan target lists" on grouping query
@ 2022-09-15 19:23  Tom Lane <tgl@sss.pgh.pa.us>
  parent: PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2022-09-15 19:23 UTC (permalink / raw)
  To: androiddown_weiwei@hotmail.com; +Cc: pgsql-bugs@lists.postgresql.org

PG Bug reporting form <noreply@postgresql.org> writes:
> The problem is reproducible with following sql:
> ```
> 	SELECT
> 		sp2.spf_id 
> 	FROM
> 		information_schema.sql_parts AS sp
> 		CROSS JOIN LATERAL ( SELECT sizing_id FROM information_schema.sql_sizing )
> AS ss
> 		CROSS JOIN LATERAL ( SELECT sp.feature_id AS spf_id ) AS sp2
> 	GROUP BY
> 		CUBE ( sp2.spf_id )
> ```
> but seems having been fixed since 12.0

Yeah, it's a bug in code that we actually removed in v12
(so the fix was kind of accidental).  Repaired, thanks
for the report!

			regards, tom lane





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


end of thread, other threads:[~2022-09-15 19:23 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-09-15 12:35 BUG #17614: "variable not found in subplan target lists" on grouping query PG Bug reporting form <noreply@postgresql.org>
2022-09-15 19:23 ` Tom Lane <tgl@sss.pgh.pa.us>

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