diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2002-04-05 00:31:36 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2002-04-05 00:31:36 +0000 |
commit | 4bdb4be62e652ee3220dae21a4fa340832c93429 (patch) | |
tree | f1b39eb4cbcc1a8fca748304770a72aec96cd472 /src/backend/optimizer/path/indxpath.c | |
parent | 0e11aea246a462e503a73908c9fc143b9f2da16a (diff) |
Divide functions into three volatility classes (immutable, stable, and
volatile), rather than the old cachable/noncachable distinction. This
allows indexscan optimizations in many places where we formerly didn't.
Also, add a pronamespace column to pg_proc (it doesn't do anything yet,
however).
Diffstat (limited to 'src/backend/optimizer/path/indxpath.c')
-rw-r--r-- | src/backend/optimizer/path/indxpath.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/backend/optimizer/path/indxpath.c b/src/backend/optimizer/path/indxpath.c index 3458c69f1b5..60a7dd95038 100644 --- a/src/backend/optimizer/path/indxpath.c +++ b/src/backend/optimizer/path/indxpath.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.114 2002/03/20 19:44:09 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.115 2002/04/05 00:31:26 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -783,7 +783,7 @@ match_clause_to_indexkey(RelOptInfo *rel, * Check for an indexqual that could be handled by a nestloop * join. We need the index key to be compared against an * expression that uses none of the indexed relation's vars and - * contains no non-cachable functions. + * contains no volatile functions. */ if (match_index_to_operand(indexkey, leftop, rel, index)) { @@ -792,7 +792,7 @@ match_clause_to_indexkey(RelOptInfo *rel, isIndexable = !intMember(lfirsti(rel->relids), othervarnos) && - !contain_noncachable_functions((Node *) rightop) && + !contain_volatile_functions((Node *) rightop) && is_indexable_operator(clause, opclass, true); freeList(othervarnos); return isIndexable; @@ -804,7 +804,7 @@ match_clause_to_indexkey(RelOptInfo *rel, isIndexable = !intMember(lfirsti(rel->relids), othervarnos) && - !contain_noncachable_functions((Node *) leftop) && + !contain_volatile_functions((Node *) leftop) && is_indexable_operator(clause, opclass, false); freeList(othervarnos); return isIndexable; @@ -1142,7 +1142,7 @@ static const StrategyNumber * implies another. A simple and general way is to see if they are * equal(); this works for any kind of expression. (Actually, there * is an implied assumption that the functions in the expression are - * cachable, ie dependent only on their input arguments --- but this + * immutable, ie dependent only on their input arguments --- but this * was checked for the predicate by CheckPredicate().) * * Our other way works only for (binary boolean) operators that are |