Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 3edec38

Browse files
committed
Fix Assert that's no longer correct now that RowCompareExpr is indexable.
1 parent a1b7e70 commit 3edec38

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/backend/optimizer/path/indxpath.c

+4-8
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
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,
16111611
bool varonleft;
16121612
bool 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. */
16201615
if (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 */
16391635
clause_op = clause->opno;

0 commit comments

Comments
 (0)