The following bug has been logged on the website:
Bug reference: 14523
Logged by: Wei Congrui
Email address: crvv(dot)mail(at)gmail(dot)com
PostgreSQL version: 9.6.1
Operating system: Linux
Description:
Error message is "plan should not reference subplan's variable"
With all other majar verions, I can get the right result.
If compare with "expression IN (subquery)" or "expression operator ANY
(subquery)", the bug only occurs on BOOL.
If compare with "expression operator ALL (subquery)", other types alse
doesn't work.
I reproduced it on Travis. https://travis-ci.org/crvv/pg