99 *
1010 *
1111 * IDENTIFICATION
12- * $PostgreSQL: pgsql/src/backend/optimizer/path/indxpath.c,v 1.199 2006/01/29 17:27:42 tgl Exp $
12+ * $PostgreSQL: pgsql/src/backend/optimizer/path/indxpath.c,v 1.200 2006/01/29 17:40:00 tgl Exp $
1313 *
1414 *-------------------------------------------------------------------------
1515 */
@@ -1611,11 +1611,6 @@ identify_ignorable_ordering_cols(PlannerInfo *root,
16111611bool varonleft ;
16121612bool ispc ;
16131613
1614- /*
1615- * We know this clause passed match_clause_to_indexcol as a
1616- * toplevel clause; so it's not a ScalarArrayOp.
1617- */
1618-
16191614/* First check for boolean-index cases. */
16201615if (IsBooleanOpclass (opclass ))
16211616{
@@ -1632,8 +1627,9 @@ identify_ignorable_ordering_cols(PlannerInfo *root,
16321627}
16331628}
16341629
1635- /* Else clause must be a binary opclause. */
1636- Assert (IsA (clause ,OpExpr ));
1630+ /* Otherwise, ignore if not a binary opclause */
1631+ if (!is_opclause (clause )|| list_length (clause -> args )!= 2 )
1632+ continue ;
16371633
16381634/* Determine left/right sides and check the operator */
16391635clause_op = clause -> opno ;