Skip to content

Commit f538329

Browse files
committed
Fix build_minmax_path() to cope if an IS NULL clause turns up in the
indexable-clauses list for a btree index. Formerly it just Asserted that all such clauses were opclauses, but that's no longer true in 8.3. Per bug #3796 from Matthias Schoeneich.
1 parent 50eed10 commit f538329

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/backend/optimizer/plan/planagg.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/optimizer/plan/planagg.c,v 1.34 2007/11/15 21:14:36 momjian Exp $
11+
* $PostgreSQL: pgsql/src/backend/optimizer/plan/planagg.c,v 1.35 2007/12/03 22:37:17 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -368,7 +368,9 @@ build_minmax_path(PlannerInfo *root, RelOptInfo *rel, MinMaxAggInfo *info)
368368
RestrictInfo *rinfo = (RestrictInfo *) lfirst(ll);
369369
int strategy;
370370

371-
Assert(is_opclause(rinfo->clause));
371+
/* Could be an IS_NULL test, if so ignore */
372+
if (!is_opclause(rinfo->clause))
373+
continue;
372374
strategy =
373375
get_op_opfamily_strategy(((OpExpr *) rinfo->clause)->opno,
374376
index->opfamily[prevcol]);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy