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(at)sss(dot)pgh(dot)pa(dot)us>:
> crvv(dot)mail(at)gmail(dot)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
>