pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #14524: Commands compare with nested subquery expressions fail with "should not reference subplan var"
4+ messages / 3 participants
[nested] [flat]
Commits from this thread:
2017-02-03 b971a98cea 555494d1bc Fix placement of initPlans when forcibly materializing a subplan.
* BUG #14524: Commands compare with nested subquery expressions fail with "should not reference subplan var"
@ 2017-02-02 06:00 crvv.mail@gmail.com
0 siblings, 1 reply; 4+ messages in thread
From: crvv.mail@gmail.com @ 2017-02-02 06:00 UTC (permalink / raw)
To: pgsql-bugs
The following bug has been logged on the website:
Bug reference: 14524
Logged by: Wei Congrui
Email address: crvv.mail@gmail.com
PostgreSQL version: 9.6.1
Operating system: Linux
Description:
SQLs which do not work are
SELECT '1' IN (SELECT (SELECT '1'::BOOL))
SELECT '1' = ANY (SELECT (SELECT '1'::BOOL))
SELECT '1' = ALL (SELECT (SELECT '1'::BOOL))
SELECT '1' = ALL (SELECT (SELECT '1'::TEXT))
SELECT '1' = ALL (SELECT (SELECT '1'::INT))
Similar SQLs but work are
SELECT '1' IN (SELECT (SELECT '1'::INT))
SELECT '1' = ANY (SELECT (SELECT '1'::TEXT))
Error message is "plan should not reference subplan's variable".
With all other majar verions, I can get the right result.
I reproduced it on Travis. https://travis-ci.org/crvv/pg
--
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] 4+ messages in thread
* Re: BUG #14524: Commands compare with nested subquery expressions fail with "should not reference subplan var"
@ 2017-02-02 22:48 Tom Lane <tgl@sss.pgh.pa.us>
parent: crvv.mail@gmail.com
0 siblings, 1 reply; 4+ messages in thread
From: Tom Lane @ 2017-02-02 22:48 UTC (permalink / raw)
To: crvv.mail@gmail.com; +Cc: pgsql-bugs
crvv.mail@gmail.com writes:
> SELECT '1' IN (SELECT (SELECT '1'::BOOL))
> Error message is "plan should not reference subplan's variable".
Seems to be a problem with pasting on Material nodes at the last minute.
As a short-term workaround, you might try turning off enable_material.
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] 4+ messages in thread
* Re: BUG #14524: Commands compare with nested subquery expressions fail with "should not reference subplan var"
@ 2017-02-07 12:56 CR VV <crvv.mail@gmail.com>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 4+ messages in thread
From: CR VV @ 2017-02-07 12:56 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-bugs
Thanks for your reply.
By turning off 'enable_material', I can execute these SQL successfully.
Will this be fixed in minor release or next major release?
2017-02-03 6:48 GMT+08:00 Tom Lane <tgl@sss.pgh.pa.us>:
> crvv.mail@gmail.com writes:
> > SELECT '1' IN (SELECT (SELECT '1'::BOOL))
> > Error message is "plan should not reference subplan's variable".
>
> Seems to be a problem with pasting on Material nodes at the last minute.
> As a short-term workaround, you might try turning off enable_material.
>
> regards, tom lane
>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: BUG #14524: Commands compare with nested subquery expressions fail with "should not reference subplan var"
@ 2017-02-07 16:40 Tom Lane <tgl@sss.pgh.pa.us>
parent: CR VV <crvv.mail@gmail.com>
0 siblings, 0 replies; 4+ messages in thread
From: Tom Lane @ 2017-02-07 16:40 UTC (permalink / raw)
To: CR VV <crvv.mail@gmail.com>; +Cc: pgsql-bugs
CR VV <crvv.mail@gmail.com> writes:
> Will this be fixed in minor release or next major release?
Yes, it's fixed for this week's minor releases.
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=555494d1bc119173bbf712940da823303...
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] 4+ messages in thread
end of thread, other threads:[~2017-02-07 16:40 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-02-02 06:00 BUG #14524: Commands compare with nested subquery expressions fail with "should not reference subplan var" crvv.mail@gmail.com
2017-02-02 22:48 ` Tom Lane <tgl@sss.pgh.pa.us>
2017-02-07 12:56 ` CR VV <crvv.mail@gmail.com>
2017-02-07 16:40 ` 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