aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2003-12-28 21:57:37 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2003-12-28 21:57:37 +0000
commitc607bd693ffcf225b7ef696ca44b537076038854 (patch)
tree5284d0d0f9b8d671dedd379199bdbba114f8a352 /src/backend/executor
parentd167fb10153a2f00c9a8b46df537a202f7755cb9 (diff)
downloadpostgresql-c607bd693ffcf225b7ef696ca44b537076038854.tar.gz
postgresql-c607bd693ffcf225b7ef696ca44b537076038854.zip
Clean up the usage of canonicalize_qual(): in particular, be consistent
about whether it is applied before or after eval_const_expressions(). I believe there were some corner cases where the system would fail to recognize that a partial index is applicable because of the previous inconsistency. Store normal rather than 'implicit AND' representations of constraints and index predicates in the catalogs. initdb forced due to representation change of constraints/predicates.
Diffstat (limited to 'src/backend/executor')
-rw-r--r--src/backend/executor/execMain.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c
index e53bb1f7040..f84b4dd690e 100644
--- a/src/backend/executor/execMain.c
+++ b/src/backend/executor/execMain.c
@@ -26,7 +26,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/executor/execMain.c,v 1.223 2003/12/01 22:07:58 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/executor/execMain.c,v 1.224 2003/12/28 21:57:36 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -40,6 +40,7 @@
#include "executor/execdebug.h"
#include "executor/execdefs.h"
#include "miscadmin.h"
+#include "optimizer/clauses.h"
#include "optimizer/var.h"
#include "parser/parsetree.h"
#include "utils/acl.h"
@@ -1658,7 +1659,8 @@ ExecRelCheck(ResultRelInfo *resultRelInfo,
(List **) palloc(ncheck * sizeof(List *));
for (i = 0; i < ncheck; i++)
{
- qual = (List *) stringToNode(check[i].ccbin);
+ /* ExecQual wants implicit-AND form */
+ qual = make_ands_implicit(stringToNode(check[i].ccbin));
resultRelInfo->ri_ConstraintExprs[i] = (List *)
ExecPrepareExpr((Expr *) qual, estate);
}