diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2002-10-20 00:58:55 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2002-10-20 00:58:55 +0000 |
| commit | a044e2abddfe96a4309d4e8b3ac1cc603f8d50ad (patch) | |
| tree | 1eaa0d72b9a694a9ffbff941a8f89284aa9b4cbe /src/include/rewrite | |
| parent | 6d6b5828500e348580faf6bdda69fe62fc0faa28 (diff) | |
| download | postgresql-a044e2abddfe96a4309d4e8b3ac1cc603f8d50ad.tar.gz | |
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.
Diffstat (limited to 'src/include/rewrite')
| -rw-r--r-- | src/include/rewrite/rewriteManip.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/include/rewrite/rewriteManip.h b/src/include/rewrite/rewriteManip.h index df54169fd2..9a9b0ae7ad 100644 --- a/src/include/rewrite/rewriteManip.h +++ b/src/include/rewrite/rewriteManip.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: rewriteManip.h,v 1.31 2002/06/20 20:29:52 momjian Exp $ + * $Id: rewriteManip.h,v 1.32 2002/10/20 00:58:55 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -32,7 +32,7 @@ extern Query *getInsertSelectQuery(Query *parsetree, Query ***subquery_ptr); extern void AddQual(Query *parsetree, Node *qual); extern void AddHavingQual(Query *parsetree, Node *havingQual); -extern void AddNotQual(Query *parsetree, Node *qual); +extern void AddInvertedQual(Query *parsetree, Node *qual); extern bool checkExprHasAggs(Node *node); extern bool checkExprHasSubLink(Node *node); |
