projects
/
users
/
bernd
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
818de67
)
Last-minute fix for 6.5.2: repair optimizer coredump on
author
Tom Lane
<
[email protected]
>
Tue, 14 Sep 1999 20:26:02 +0000
(20:26 +0000)
committer
Tom Lane
<
[email protected]
>
Tue, 14 Sep 1999 20:26:02 +0000
(20:26 +0000)
CASE clauses in WHERE. Surprised no one noticed this before.
src/backend/optimizer/path/indxpath.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/optimizer/path/indxpath.c
b/src/backend/optimizer/path/indxpath.c
index 45e5a292fde46ad8899da6ccf5185ed280fe1237..e292d3116143b7f7fe153b2be649fe083f79ae18 100644
(file)
--- a/
src/backend/optimizer/path/indxpath.c
+++ b/
src/backend/optimizer/path/indxpath.c
@@
-585,12
+585,13
@@
match_clause_to_indexkey(RelOptInfo *rel,
Oid restrict_op = InvalidOid;
bool isIndexable = false;
- if (or_clause((Node *) clause) ||
- not_clause((Node *) clause) || single_node((Node *) clause))
- return (RestrictInfo *) NULL;
-
+ /* Clause must be a binary opclause. */
+ if (! is_opclause((Node *) clause))
+ return NULL;
leftop = get_leftop(clause);
rightop = get_rightop(clause);
+ if (! leftop || ! rightop)
+ return NULL;
/*
* If this is not a join clause, check for clauses of the form: