Skip site navigation (1) Skip section navigation (2)

BUG #14524: Commands compare with nested subquery expressions fail with "should not reference subplan var"

From: crvv(dot)mail(at)gmail(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #14524: Commands compare with nested subquery expressions fail with "should not reference subplan var"
Date: 2017-02-02 06:00:20
Message-ID: 20170202060020.1400.89021@wrigleys.postgresql.org (view raw, whole thread or download thread mbox)
Thread:
Lists: pgsql-bugs
The following bug has been logged on the website:

Bug reference:      14524
Logged by:          Wei Congrui
Email address:      crvv(dot)mail(at)gmail(dot)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


Responses

pgsql-bugs by date

Next:From: Michael PaquierDate: 2017-02-02 06:34:33
Subject: Re: [BUGS] Bug in Physical Replication Slots (at least 9.5)?
Previous:From: crvv.mailDate: 2017-02-02 05:34:38
Subject: BUG #14523: Commands which compare with nested subquery expression fails with "should not reference subplan var"

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group