Hello, I gave this patch a very quick scan. I didn't check the actual logic behind it.
This comment seems wrong: + * However weak implication fails: e.g., "NULL IS NOT NULL" is false, but + * "NULL = ANY(ARRAY[NULL])" is NULL, so non-falsity does not imply non-falsity. "non-falsity does not imply non-falsity"? I suppose one of those negations should be different ... I think the name clause_proved_for_null_test() is a bit weird, being in the past tense. I'd maybe change "proved" to "proves". s/exppresions/expresions/ in the test files. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services