mirror of
https://github.com/postgres/postgres.git
synced 2025-08-11 04:22:52 +03:00
Last-minute fix for 6.5.2: repair optimizer coredump on
CASE clauses in WHERE. Surprised no one noticed this before.
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.57 1999/06/19 04:54:14 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.57.2.1 1999/09/14 20:26:02 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@@ -585,12 +585,13 @@ match_clause_to_indexkey(RelOptInfo *rel,
|
|||||||
Oid restrict_op = InvalidOid;
|
Oid restrict_op = InvalidOid;
|
||||||
bool isIndexable = false;
|
bool isIndexable = false;
|
||||||
|
|
||||||
if (or_clause((Node *) clause) ||
|
/* Clause must be a binary opclause. */
|
||||||
not_clause((Node *) clause) || single_node((Node *) clause))
|
if (! is_opclause((Node *) clause))
|
||||||
return (RestrictInfo *) NULL;
|
return NULL;
|
||||||
|
|
||||||
leftop = get_leftop(clause);
|
leftop = get_leftop(clause);
|
||||||
rightop = get_rightop(clause);
|
rightop = get_rightop(clause);
|
||||||
|
if (! leftop || ! rightop)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If this is not a join clause, check for clauses of the form:
|
* If this is not a join clause, check for clauses of the form:
|
||||||
|
Reference in New Issue
Block a user