From 926e8a00d38e1873369ab9a24062440c82d7731c Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 27 Mar 2005 06:29:49 +0000 Subject: Add a back-link from IndexOptInfo structs to their parent RelOptInfo structs. There are many places in the planner where we were passing both a rel and an index to subroutines, and now need only pass the index struct. Notationally simpler, and perhaps a tad faster. --- src/backend/optimizer/path/orindxpath.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/backend/optimizer/path/orindxpath.c') diff --git a/src/backend/optimizer/path/orindxpath.c b/src/backend/optimizer/path/orindxpath.c index 1cda19c8fa7..0843bb6ea88 100644 --- a/src/backend/optimizer/path/orindxpath.c +++ b/src/backend/optimizer/path/orindxpath.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/optimizer/path/orindxpath.c,v 1.66 2005/03/26 23:29:17 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/optimizer/path/orindxpath.c,v 1.67 2005/03/27 06:29:36 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -383,7 +383,7 @@ best_or_subclause_index(Query *root, } /* Collect index clauses usable with this index */ - indexclauses = group_clauses_by_indexkey_for_or(rel, index, subclause); + indexclauses = group_clauses_by_indexkey_for_or(index, subclause); /* * Ignore index if it doesn't match the subclause at all; except @@ -398,9 +398,9 @@ best_or_subclause_index(Query *root, continue; /* Convert clauses to indexquals the executor can handle */ - indexquals = expand_indexqual_conditions(rel, index, indexclauses); + indexquals = expand_indexqual_conditions(index, indexclauses); - cost_index(&subclause_path, root, rel, index, indexquals, false); + cost_index(&subclause_path, root, index, indexquals, false); if (!found || subclause_path.total_cost < *retTotalCost) { -- cgit v1.2.3