Hi Kelly,
> ERROR: missing FROM-clause entry for table "r2"
I can reproduce this on master. Rafia posted a patch for the same
error [1], and it fixes your queries for me.
Rafia, the nested EXISTS case here may be worth adding to your test.
[1]
https://www.postgresql.org/message-id/CA+FpmFdQ9P4EgMSkAJh29e744TxzBpkOOSfy1Cxoco-ZK3zbvQ@mail.gmail.com
Thanks,
Shihao