diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2000-02-05 18:26:09 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2000-02-05 18:26:09 +0000 |
commit | 78296c2797cff799ccfee1332261340b685b4242 (patch) | |
tree | 140df7986eed94296bb0c30adaa1db9418d28d46 /src/include/optimizer/paths.h | |
parent | dd14cd63beee8eca5646b41d16d39933d9a201ee (diff) |
Further cleanup for OR-of-AND WHERE-clauses. orindxpath can now handle
extracting from an AND subclause just those opclauses that are relevant
for a particular index. For example, we can now consider using an index
on x to process WHERE (x = 1 AND y = 2) OR (x = 2 AND y = 4) OR ...
Diffstat (limited to 'src/include/optimizer/paths.h')
-rw-r--r-- | src/include/optimizer/paths.h | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/include/optimizer/paths.h b/src/include/optimizer/paths.h index 3ba443f4392..c422654c5ad 100644 --- a/src/include/optimizer/paths.h +++ b/src/include/optimizer/paths.h @@ -8,7 +8,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: paths.h,v 1.39 2000/01/26 05:58:20 momjian Exp $ + * $Id: paths.h,v 1.40 2000/02/05 18:26:07 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -38,9 +38,19 @@ extern List *create_index_paths(Query *root, RelOptInfo *rel, List *indices, List *joininfo_list); extern Oid indexable_operator(Expr *clause, Oid opclass, Oid relam, bool indexkey_on_left); +extern List *extract_or_indexqual_conditions(RelOptInfo *rel, + IndexOptInfo *index, + Expr *orsubclause); extern List *expand_indexqual_conditions(List *indexquals); /* + * orindxpath.c + * additional routines for indexable OR clauses + */ +extern List *create_or_index_paths(Query *root, RelOptInfo *rel, + List *clauses); + +/* * tidpath.h * routines to generate tid paths */ @@ -52,12 +62,6 @@ extern List *create_tidscan_paths(Query *root, RelOptInfo *rel); */ extern void update_rels_pathlist_for_joins(Query *root, List *joinrels); - -/* - * orindxpath.c - */ -extern List *create_or_index_paths(Query *root, RelOptInfo *rel, List *clauses); - /* * pathkeys.c * utilities for matching and building path keys @@ -100,7 +104,7 @@ extern bool nonoverlap_sets(List *s1, List *s2); extern bool is_subset(List *s1, List *s2); /* - * prototypes for path/prune.c + * prune.c */ extern void merge_rels_with_same_relids(List *rel_list); extern void rels_set_cheapest(Query *root, List *rel_list); |