Commit b88e9784 authored by Bruce Momjian's avatar Bruce Momjian

Cleanup of OR processing.

parent 7665e7b0
......@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.22 1998/08/02 07:10:38 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.23 1998/08/03 05:49:19 momjian Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -307,17 +307,23 @@ match_index_orclause(RelOptInfo *rel,
List *other_matching_indices)
{
Node *clause = NULL;
List *matched_indices;
List *matching_indices = other_matching_indices;
List *index_list = NIL;
List *clist;
/* first time through, we create index list */
if (!other_matching_indices)
{
foreach(clist, or_clauses)
matching_indices = lcons(NIL, matching_indices);
}
else matching_indices = other_matching_indices;
index_list = matching_indices;
foreach(clist, or_clauses)
{
clause = lfirst(clist);
if (other_matching_indices)
matched_indices = lfirst(other_matching_indices);
else
matched_indices = NIL;
if (is_opclause(clause) &&
op_class(((Oper *) ((Expr *) clause)->oper)->opno,
......@@ -333,14 +339,10 @@ match_index_orclause(RelOptInfo *rel,
index) &&
IsA(get_rightop((Expr *) clause), Const))))
{
matched_indices = lcons(index, matched_indices);
lfirst(matching_indices) = lcons(index, lfirst(matching_indices));
}
/* for the first index, we are creating the indexids list */
index_list = lappend(index_list, matched_indices);
if (other_matching_indices)
other_matching_indices = lnext(other_matching_indices);
matching_indices = lnext(matching_indices);
}
return (index_list);
......
This diff is collapsed.
src/tools/backend/flow.jpg

41 KB | W: | H:

src/tools/backend/flow.jpg

72.5 KB | W: | H:

src/tools/backend/flow.jpg
src/tools/backend/flow.jpg
src/tools/backend/flow.jpg
src/tools/backend/flow.jpg
  • 2-up
  • Swipe
  • Onion skin
......@@ -20,23 +20,23 @@ Click on an item to see more detail or look at the full
<IMG src="flow.jpg" usemap="#flowmap" alt="flowchart">
</CENTER>
<MAP name="flowmap">
<AREA COORDS="290,10,450,50" HREF="backend_dirs.html#main">
<AREA COORDS="550,10,710,50" HREF="backend_dirs.html#bootstrap">
<AREA COORDS="290,90,450,130," HREF="backend_dirs.html#postmaster">
<AREA COORDS="550,90,710,130," HREF="backend_dirs.html#libpq">
<AREA COORDS="290,170,450,210" HREF="backend_dirs.html#tcop">
<AREA COORDS="550,170,710,210" HREF="backend_dirs.html#tcop">
<AREA COORDS="290,270,450,310" HREF="backend_dirs.html#parser">
<AREA COORDS="290,350,450,390" HREF="backend_dirs.html#tcop">
<AREA COORDS="290,430,450,470" HREF="backend_dirs.html#optimizer">
<AREA COORDS="290,510,450,550" HREF="backend_dirs.html#optimizer/plan">
<AREA COORDS="290,570,450,630" HREF="backend_dirs.html#executor">
<AREA COORDS="550,350,710,390" HREF="backend_dirs.html#commands">
<AREA COORDS="10,330,170,370" HREF="backend_dirs.html#access">
<AREA COORDS="10,390,170,430" HREF="backend_dirs.html#catalog">
<AREA COORDS="10,450,170,490" HREF="backend_dirs.html#utils">
<AREA COORDS="10,510,170,550" HREF="backend_dirs.html#nodes">
<AREA COORDS="10,570,170,610" HREF="backend_dirs.html#storage">
<AREA COORDS="80,130,240,170" HREF="backend_dirs.html#main">
<AREA COORDS="80,210,240,250" HREF="backend_dirs.html#postmaster">
<AREA COORDS="340,170,500,210" HREF="backend_dirs.html#libpq">
<AREA COORDS="80,290,240,330" HREF="backend_dirs.html#tcop">
<AREA COORDS="340,290,500,330" HREF="backend_dirs.html#tcop">
<AREA COORDS="80,390,240,430" HREF="backend_dirs.html#parser">
<AREA COORDS="80,470,240,510" HREF="backend_dirs.html#tcop">
<AREA COORDS="80,550,240,590" HREF="backend_dirs.html#optimizer">
<AREA COORDS="80,530,240,670" HREF="backend_dirs.html#optimizer/plan">
<AREA COORDS="80,710,240,750" HREF="backend_dirs.html#executor">
<AREA COORDS="340,470,500,510" HREF="backend_dirs.html#commands">
<AREA COORDS="10,820,170,870" HREF="backend_dirs.html#utils">
<AREA COORDS="220,820,380,860" HREF="backend_dirs.html#catalog">
<AREA COORDS="430,820,600,870" HREF="backend_dirs.html#storage">
<AREA COORDS="110,900,280,950" HREF="backend_dirs.html#access">
<AREA COORDS="340,900,500,950" HREF="backend_dirs.html#nodes">
<AREA COORDS="20,990,180,1030" HREF="backend_dirs.html#bootstrap">
</MAP>
<BR>
<P>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment