summaryrefslogtreecommitdiff
path: root/src/backend/utils/cache/relcache.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/utils/cache/relcache.c')
-rw-r--r--src/backend/utils/cache/relcache.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c
index 4ebe103c1ad..afaf8794f00 100644
--- a/src/backend/utils/cache/relcache.c
+++ b/src/backend/utils/cache/relcache.c
@@ -4091,7 +4091,8 @@ RelationGetIndexExpressions(Relation relation)
* Run the expressions through eval_const_expressions. This is not just an
* optimization, but is necessary, because the planner will be comparing
* them to similarly-processed qual clauses, and may fail to detect valid
- * matches without this. We don't bother with canonicalize_qual, however.
+ * matches without this. We must not use canonicalize_qual, however,
+ * since these aren't qual expressions.
*/
result = (List *) eval_const_expressions(NULL, (Node *) result);
@@ -4159,7 +4160,7 @@ RelationGetIndexPredicate(Relation relation)
*/
result = (List *) eval_const_expressions(NULL, (Node *) result);
- result = (List *) canonicalize_qual((Expr *) result);
+ result = (List *) canonicalize_qual_ext((Expr *) result, false);
/* Also convert to implicit-AND format */
result = make_ands_implicit((Expr *) result);