[BUGS] BUG #14524: Commands compare with nested subquery expressions failwith "should not reference subplan var" - Mailing list pgsql-bugs

From crvv.mail@gmail.com
Subject [BUGS] BUG #14524: Commands compare with nested subquery expressions failwith "should not reference subplan var"
Date
Msg-id 20170202060020.1400.89021@wrigleys.postgresql.org
Whole thread Raw
Responses Re: [BUGS] BUG #14524: Commands compare with nested subquery expressions fail with "should not reference subplan var"  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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

pgsql-bugs by date:

Previous
From: crvv.mail@gmail.com
Date:
Subject: [BUGS] BUG #14523: Commands which compare with nested subquery expressionfails with "should not reference subplan var"
Next
From: Michael Paquier
Date:
Subject: Re: [BUGS] Bug in Physical Replication Slots (at least 9.5)?