Rule rewriter was doing the wrong thing with conditional INSTEAD rules

Tom Lane <tgl@sss.pgh.pa.us>

Commit: a044e2abddfe96a4309d4e8b3ac1cc603f8d50ad
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2002-10-20T00:58:55Z
Releases: 7.3.1
Rule rewriter was doing the wrong thing with conditional INSTEAD rules
whose conditions might yield NULL.  The negated qual to attach to the
original query is properly 'x IS NOT TRUE', not 'NOT x'.  This fix
produces correct behavior, but we may be taking a performance hit because
the planner is much stupider about IS NOT TRUE than it is about NOT
clauses.  Future TODO: teach prepqual, other parts of planner how to
cope with BooleanTest clauses more effectively.

Files