*** backend/optimizer/path/indxpath.c.orig	Sat Jun 19 00:54:14 1999
--- backend/optimizer/path/indxpath.c	Tue Sep 14 16:26:02 1999
***************
*** 585,596 ****
  	Oid			restrict_op = InvalidOid;
  	bool		isIndexable = false;
  
! 	if (or_clause((Node *) clause) ||
! 		not_clause((Node *) clause) || single_node((Node *) clause))
! 		return (RestrictInfo *) NULL;
! 
  	leftop = get_leftop(clause);
  	rightop = get_rightop(clause);
  
  	/*
  	 * If this is not a join clause, check for clauses of the form:
--- 585,597 ----
  	Oid			restrict_op = InvalidOid;
  	bool		isIndexable = false;
  
! 	/* 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:
