aboutsummaryrefslogtreecommitdiff
path: root/src/backend/optimizer/util/pathnode.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-03-26 23:29:20 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-03-26 23:29:20 +0000
commitfebc9a613cd523de84da883a81e2040c3b1336a6 (patch)
tree8f464a85bbe6d8983bcfea7ba0210e0b89c79b07 /src/backend/optimizer/util/pathnode.c
parent9d388e1f3980a9d960c2f7c500f9c13a35c48d88 (diff)
downloadpostgresql-febc9a613cd523de84da883a81e2040c3b1336a6.tar.gz
postgresql-febc9a613cd523de84da883a81e2040c3b1336a6.zip
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/backend/optimizer/util/pathnode.c')
-rw-r--r--src/backend/optimizer/util/pathnode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/optimizer/util/pathnode.c b/src/backend/optimizer/util/pathnode.c
index f20c95299f3..53b2197edd4 100644
--- a/src/backend/optimizer/util/pathnode.c
+++ b/src/backend/optimizer/util/pathnode.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/optimizer/util/pathnode.c,v 1.112 2005/03/10 23:21:22 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/optimizer/util/pathnode.c,v 1.113 2005/03/26 23:29:18 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -444,7 +444,7 @@ create_index_path(Query *root,
pathnode->path.pathkeys = pathkeys;
/* Convert clauses to indexquals the executor can handle */
- indexquals = expand_indexqual_conditions(index, restriction_clauses);
+ indexquals = expand_indexqual_conditions(rel, index, restriction_clauses);
/* Flatten the clause-groups list to produce indexclauses list */
restriction_clauses = flatten_clausegroups_list(restriction_clauses);