diff options
| author | Tom Lane | 2005-03-26 23:29:20 +0000 |
|---|---|---|
| committer | Tom Lane | 2005-03-26 23:29:20 +0000 |
| commit | febc9a613cd523de84da883a81e2040c3b1336a6 (patch) | |
| tree | 8f464a85bbe6d8983bcfea7ba0210e0b89c79b07 /src/include/optimizer | |
| parent | 9d388e1f3980a9d960c2f7c500f9c13a35c48d88 (diff) | |
Expand the 'special index operator' machinery to handle special cases
for boolean indexes. Previously we would only use such an index with
WHERE clauses like 'indexkey = true' or 'indexkey = false'. The new
code transforms the cases 'indexkey', 'NOT indexkey', 'indexkey IS TRUE',
and 'indexkey IS FALSE' into one of these. While this is only marginally
useful in itself, I intend soon to change constant-expression simplification
so that 'foo = true' and 'foo = false' are reduced to just 'foo' and
'NOT foo' ... which would lose the ability to use boolean indexes for
such queries at all, if the indexscan machinery couldn't make the
reverse transformation.
Diffstat (limited to 'src/include/optimizer')
| -rw-r--r-- | src/include/optimizer/paths.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/include/optimizer/paths.h b/src/include/optimizer/paths.h index db1a9f4affc..d159e1ecf4e 100644 --- a/src/include/optimizer/paths.h +++ b/src/include/optimizer/paths.h @@ -8,7 +8,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/optimizer/paths.h,v 1.78 2005/01/23 02:21:36 tgl Exp $ + * $PostgreSQL: pgsql/src/include/optimizer/paths.h,v 1.79 2005/03/26 23:29:20 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -41,8 +41,9 @@ extern Path *best_inner_indexscan(Query *root, RelOptInfo *rel, extern List *group_clauses_by_indexkey_for_or(RelOptInfo *rel, IndexOptInfo *index, Expr *orsubclause); -extern List *expand_indexqual_conditions(IndexOptInfo *index, - List *clausegroups); +extern List *expand_indexqual_conditions(RelOptInfo *rel, + IndexOptInfo *index, + List *clausegroups); extern void check_partial_indexes(Query *root, RelOptInfo *rel); extern bool pred_test(List *predicate_list, List *restrictinfo_list); extern List *flatten_clausegroups_list(List *clausegroups); |
