From f03729c62178890fab5ab33d721c70d3f474c512 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Mon, 9 Nov 1998 02:49:13 +0000 Subject: [PATCH] Fix for NOT in where clause causing crash. --- src/backend/optimizer/path/clausesel.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/backend/optimizer/path/clausesel.c b/src/backend/optimizer/path/clausesel.c index 8a0536c7bb..0bdca62893 100644 --- a/src/backend/optimizer/path/clausesel.c +++ b/src/backend/optimizer/path/clausesel.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/clausesel.c,v 1.13 1998/09/01 04:29:29 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/clausesel.c,v 1.14 1998/11/09 02:49:13 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -254,6 +254,11 @@ compute_selec(Query *root, List *clauses, List *or_selectivities) */ s1 = 0.1; } + else if (not_clause((Node *) clause)) + { + /* negate this baby */ + return 1 - compute_selec(root, ((Expr *)clause)->args, or_selectivities); + } else if (is_subplan((Node *) clause)) { -- 2.40.0