Hello,
Just for information there are some works regarding how to include this incore,that may interest you ;o)
see "NOT IN subquery optimization"https://www.postgresql.org/message-id/flat/1550706289606-0.post%40n3.nabble.com
commitfest entry: https://commitfest.postgresql.org/24/2023/
and "Converting NOT IN to anti-joins during planning"https://www.postgresql.org/message-id/flat/CAKJS1f82pqjqe3WT9_xREmXyG20aOkHc-XqkKZG_yMA7JVJ3Tw%40mail.gmail.com
commitfest entry: https://commitfest.postgresql.org/24/2020/
RegardsPAscal
--Sent from: https://www.postgresql-archive.org/PostgreSQL-hackers-f1928748.html