1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-22 12:22:45 +03:00

Merge restrictlist_selectivity into clauselist_selectivity by

teaching the latter to accept either RestrictInfo nodes or bare
clause expressions; and cache the selectivity result in the RestrictInfo
node when possible.  This extends the caching behavior of approx_selectivity
to many more contexts, and should reduce duplicate selectivity
calculations.
This commit is contained in:
Tom Lane
2004-01-04 03:51:52 +00:00
parent 21a1202281
commit 82b4dd394f
12 changed files with 196 additions and 200 deletions

View File

@@ -14,7 +14,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/optimizer/prep/prepunion.c,v 1.106 2004/01/04 00:07:32 tgl Exp $
* $PostgreSQL: pgsql/src/backend/optimizer/prep/prepunion.c,v 1.107 2004/01/04 03:51:52 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -885,9 +885,10 @@ adjust_inherited_attrs_mutator(Node *node,
newinfo->orclause = (Expr *)
adjust_inherited_attrs_mutator((Node *) oldinfo->orclause, context);
/*
* Adjust left/right relid sets too.
*/
/* adjust relid sets too */
newinfo->clause_relids = adjust_relid_set(oldinfo->clause_relids,
context->old_rt_index,
context->new_rt_index);
newinfo->left_relids = adjust_relid_set(oldinfo->left_relids,
context->old_rt_index,
context->new_rt_index);