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

Add proofreader's changes to docs.

Fix misspelling of disbursion to dispersion.
This commit is contained in:
Bruce Momjian
2000-10-05 19:48:34 +00:00
parent 05e3d0ee86
commit b32685a999
62 changed files with 259 additions and 259 deletions

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.66 2000/07/03 23:09:10 wieck Exp $
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.67 2000/10/05 19:48:20 momjian Exp $
*
* NOTES
* some of the executor utility code such as "ExecTypeFromTL" should be
@@ -239,7 +239,7 @@ equalTupleDescs(TupleDesc tupdesc1, TupleDesc tupdesc2)
/*
* We do not need to check every single field here, and in fact
* some fields such as attdisbursion probably shouldn't be
* some fields such as attdispersion probably shouldn't be
* compared.
*/
if (strcmp(NameStr(attr1->attname), NameStr(attr2->attname)) != 0)
@@ -348,7 +348,7 @@ TupleDescInitEntry(TupleDesc desc,
MemSet(NameStr(att->attname), 0, NAMEDATALEN);
att->attdisbursion = 0; /* dummy value */
att->attdispersion = 0; /* dummy value */
att->attcacheoff = -1;
att->atttypmod = typmod;

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.146 2000/09/30 18:28:53 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.147 2000/10/05 19:48:21 momjian Exp $
*
*
* INTERFACE ROUTINES
@@ -360,7 +360,7 @@ heap_storage_create(Relation rel)
* work? Is it automatic now? Expects the caller to have
* attname, atttypid, atttyparg, attproc, and attlen domains filled.
* Create fills the attnum domains sequentually from zero,
* fills the attdisbursion domains with zeros, and fills the
* fills the attdispersion domains with zeros, and fills the
* attrelid fields with the relid.
*
* scan relation catalog for name conflict
@@ -564,7 +564,7 @@ AddNewAttributeTuples(Oid new_rel_oid,
for (i = 0; i < natts; i++)
{
(*dpp)->attrelid = new_rel_oid;
(*dpp)->attdisbursion = 0;
(*dpp)->attdispersion = 0;
tup = heap_addheader(Natts_pg_attribute,
ATTRIBUTE_TUPLE_SIZE,
@@ -587,7 +587,7 @@ AddNewAttributeTuples(Oid new_rel_oid,
for (i = 0; i < -1 - FirstLowInvalidHeapAttributeNumber; i++)
{
(*dpp)->attrelid = new_rel_oid;
/* (*dpp)->attdisbursion = 0; unneeded */
/* (*dpp)->attdispersion = 0; unneeded */
tup = heap_addheader(Natts_pg_attribute,
ATTRIBUTE_TUPLE_SIZE,

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.126 2000/07/14 22:17:41 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.127 2000/10/05 19:48:21 momjian Exp $
*
*
* INTERFACE ROUTINES
@@ -305,7 +305,7 @@ ConstructTupleDescriptor(Oid heapoid,
*/
((Form_pg_attribute) to)->attnum = i + 1;
((Form_pg_attribute) to)->attdisbursion = 0.0;
((Form_pg_attribute) to)->attdispersion = 0.0;
((Form_pg_attribute) to)->attnotnull = false;
((Form_pg_attribute) to)->atthasdef = false;
((Form_pg_attribute) to)->attcacheoff = -1;

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/analyze.c,v 1.6 2000/09/06 14:15:16 petere Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/analyze.c,v 1.7 2000/10/05 19:48:22 momjian Exp $
*
*-------------------------------------------------------------------------
@@ -439,13 +439,13 @@ update_attstats(Oid relid, int natts, VacAttrStats *vacattrstats)
float4 selratio; /* average ratio of rows selected
* for a random constant */
/* Compute disbursion */
/* Compute dispersion */
if (stats->nonnull_cnt == 0 && stats->null_cnt == 0)
{
/*
* empty relation, so put a dummy value in
* attdisbursion
* attdispersion
*/
selratio = 0;
}
@@ -455,9 +455,9 @@ update_attstats(Oid relid, int natts, VacAttrStats *vacattrstats)
* looks like we have a unique-key attribute --- flag
* this with special -1.0 flag value.
*
* The correct disbursion is 1.0/numberOfRows, but since
* The correct dispersion is 1.0/numberOfRows, but since
* the relation row count can get updated without
* recomputing disbursion, we want to store a
* recomputing dispersion, we want to store a
* "symbolic" value and figure 1.0/numberOfRows on the
* fly.
*/
@@ -499,7 +499,7 @@ update_attstats(Oid relid, int natts, VacAttrStats *vacattrstats)
}
/* overwrite the existing statistics in the tuple */
attp->attdisbursion = selratio;
attp->attdispersion = selratio;
/* invalidate the tuple in the cache and write the buffer */
RelationInvalidateHeapTuple(ad, atup);

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.104 2000/09/29 18:21:26 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.105 2000/10/05 19:48:22 momjian Exp $
*
* NOTES
* The PerformAddAttribute() code, like most of the relation
@@ -459,7 +459,7 @@ AlterTableAddColumn(const char *relationName,
namestrcpy(&(attribute->attname), colDef->colname);
attribute->atttypid = typeTuple->t_data->t_oid;
attribute->attlen = tform->typlen;
attribute->attdisbursion = 0;
attribute->attdispersion = 0;
attribute->attcacheoff = -1;
attribute->atttypmod = colDef->typename->typmod;
attribute->attnum = i;

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.166 2000/09/19 19:30:03 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.167 2000/10/05 19:48:22 momjian Exp $
*
*-------------------------------------------------------------------------
@@ -2124,10 +2124,10 @@ tid_reaped(ItemPointer itemptr, VacPageList vacpagelist)
*
* Statistics are stored in several places: the pg_class row for the
* relation has stats about the whole relation, the pg_attribute rows
* for each attribute store "disbursion", and there is a pg_statistic
* row for each (non-system) attribute. (Disbursion probably ought to
* for each attribute store "dispersion", and there is a pg_statistic
* row for each (non-system) attribute. (Dispersion probably ought to
* be moved to pg_statistic, but it's not worth doing unless there's
* another reason to have to change pg_attribute.) Disbursion and
* another reason to have to change pg_attribute.) Dispersion and
* pg_statistic values are only updated by VACUUM ANALYZE, but we
* always update the stats in pg_class.
*

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.66 2000/09/12 21:06:48 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.67 2000/10/05 19:48:25 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -567,7 +567,7 @@ ExecSetTypeInfo(int index,
att->atttypid = typeID;
att->attdefrel = 0; /* dummy value */
att->attdisbursion = 0; /* dummy value */
att->attdispersion = 0; /* dummy value */
att->atttyparg = 0; /* dummy value */
att->attlen = attLen;
att->attnum = attNum;

View File

@@ -42,7 +42,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/costsize.c,v 1.63 2000/09/29 18:21:32 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/costsize.c,v 1.64 2000/10/05 19:48:26 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -571,7 +571,7 @@ cost_mergejoin(Path *path,
* 'outer_path' is the path for the outer relation
* 'inner_path' is the path for the inner relation
* 'restrictlist' are the RestrictInfo nodes to be applied at the join
* 'innerdisbursion' is an estimate of the disbursion statistic
* 'innerdispersion' is an estimate of the dispersion statistic
* for the inner hash key.
*/
void
@@ -579,7 +579,7 @@ cost_hashjoin(Path *path,
Path *outer_path,
Path *inner_path,
List *restrictlist,
Selectivity innerdisbursion)
Selectivity innerdispersion)
{
Cost startup_cost = 0;
Cost run_cost = 0;
@@ -609,12 +609,12 @@ cost_hashjoin(Path *path,
* average bucket loading of NTUP_PER_BUCKET, but that goal will
* be reached only if data values are uniformly distributed among
* the buckets. To be conservative, we scale up the target bucket
* size by the number of inner rows times inner disbursion, giving
* size by the number of inner rows times inner dispersion, giving
* an estimate of the typical number of duplicates of each value.
* We then charge one cpu_operator_cost per tuple comparison.
*/
run_cost += cpu_operator_cost * outer_path->parent->rows *
NTUP_PER_BUCKET * ceil(inner_path->parent->rows * innerdisbursion);
NTUP_PER_BUCKET * ceil(inner_path->parent->rows * innerdispersion);
/*
* Estimate the number of tuples that get through the hashing filter
@@ -649,7 +649,7 @@ cost_hashjoin(Path *path,
/*
* Bias against putting larger relation on inside. We don't want an
* absolute prohibition, though, since larger relation might have
* better disbursion --- and we can't trust the size estimates
* better dispersion --- and we can't trust the size estimates
* unreservedly, anyway. Instead, inflate the startup cost by the
* square root of the size ratio. (Why square root? No real good
* reason, but it seems reasonable...)

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinpath.c,v 1.57 2000/09/29 18:21:32 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinpath.c,v 1.58 2000/10/05 19:48:26 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -45,7 +45,7 @@ static void hash_inner_and_outer(Query *root, RelOptInfo *joinrel,
List *restrictlist, JoinType jointype);
static Path *best_innerjoin(List *join_paths, List *outer_relid,
JoinType jointype);
static Selectivity estimate_disbursion(Query *root, Var *var);
static Selectivity estimate_dispersion(Query *root, Var *var);
static List *select_mergejoin_clauses(RelOptInfo *joinrel,
RelOptInfo *outerrel,
RelOptInfo *innerrel,
@@ -637,7 +637,7 @@ hash_inner_and_outer(Query *root,
*right,
*inner;
List *hashclauses;
Selectivity innerdisbursion;
Selectivity innerdispersion;
if (restrictinfo->hashjoinoperator == InvalidOid)
continue; /* not hashjoinable */
@@ -667,8 +667,8 @@ hash_inner_and_outer(Query *root,
/* always a one-element list of hash clauses */
hashclauses = makeList1(restrictinfo);
/* estimate disbursion of inner var for costing purposes */
innerdisbursion = estimate_disbursion(root, inner);
/* estimate dispersion of inner var for costing purposes */
innerdispersion = estimate_dispersion(root, inner);
/*
* We consider both the cheapest-total-cost and
@@ -682,7 +682,7 @@ hash_inner_and_outer(Query *root,
innerrel->cheapest_total_path,
restrictlist,
hashclauses,
innerdisbursion));
innerdispersion));
if (outerrel->cheapest_startup_path != outerrel->cheapest_total_path)
add_path(joinrel, (Path *)
create_hashjoin_path(joinrel,
@@ -691,7 +691,7 @@ hash_inner_and_outer(Query *root,
innerrel->cheapest_total_path,
restrictlist,
hashclauses,
innerdisbursion));
innerdispersion));
}
}
@@ -759,7 +759,7 @@ best_innerjoin(List *join_paths, Relids outer_relids, JoinType jointype)
}
/*
* Estimate disbursion of the specified Var
* Estimate dispersion of the specified Var
*
* We use a default of 0.1 if we can't figure out anything better.
* This will typically discourage use of a hash rather strongly,
@@ -768,7 +768,7 @@ best_innerjoin(List *join_paths, Relids outer_relids, JoinType jointype)
* seem much worse).
*/
static Selectivity
estimate_disbursion(Query *root, Var *var)
estimate_dispersion(Query *root, Var *var)
{
Oid relid;
@@ -780,7 +780,7 @@ estimate_disbursion(Query *root, Var *var)
if (relid == InvalidOid)
return 0.1;
return (Selectivity) get_attdisbursion(relid, var->varattno, 0.1);
return (Selectivity) get_attdispersion(relid, var->varattno, 0.1);
}
/*

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/pathnode.c,v 1.66 2000/09/29 18:21:23 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/pathnode.c,v 1.67 2000/10/05 19:48:27 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -522,7 +522,7 @@ create_mergejoin_path(RelOptInfo *joinrel,
* 'restrict_clauses' are the RestrictInfo nodes to apply at the join
* 'hashclauses' is a list of the hash join clause (always a 1-element list)
* (this should be a subset of the restrict_clauses list)
* 'innerdisbursion' is an estimate of the disbursion of the inner hash key
* 'innerdispersion' is an estimate of the dispersion of the inner hash key
*
*/
HashPath *
@@ -532,7 +532,7 @@ create_hashjoin_path(RelOptInfo *joinrel,
Path *inner_path,
List *restrict_clauses,
List *hashclauses,
Selectivity innerdisbursion)
Selectivity innerdispersion)
{
HashPath *pathnode = makeNode(HashPath);
@@ -550,7 +550,7 @@ create_hashjoin_path(RelOptInfo *joinrel,
outer_path,
inner_path,
restrict_clauses,
innerdisbursion);
innerdispersion);
return pathnode;
}

View File

@@ -15,7 +15,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.79 2000/09/15 18:45:26 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.80 2000/10/05 19:48:28 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -230,11 +230,11 @@ eqsel(PG_FUNCTION_ARGS)
/*
* No VACUUM ANALYZE stats available, so make a guess using
* the disbursion stat (if we have that, which is unlikely for
* the dispersion stat (if we have that, which is unlikely for
* a normal attribute; but for a system attribute we may be
* able to estimate it).
*/
selec = get_attdisbursion(relid, attno, 0.01);
selec = get_attdispersion(relid, attno, 0.01);
}
result = (float8) selec;
@@ -655,8 +655,8 @@ eqjoinsel(PG_FUNCTION_ARGS)
result = DEFAULT_EQ_SEL;
else
{
num1 = unknown1 ? 1.0 : get_attdisbursion(relid1, attno1, 0.01);
num2 = unknown2 ? 1.0 : get_attdisbursion(relid2, attno2, 0.01);
num1 = unknown1 ? 1.0 : get_attdispersion(relid1, attno1, 0.01);
num2 = unknown2 ? 1.0 : get_attdispersion(relid2, attno2, 0.01);
/*
* The join selectivity cannot be more than num2, since each tuple
@@ -666,7 +666,7 @@ eqjoinsel(PG_FUNCTION_ARGS)
* reasoning it is not more than num1. The min is therefore an
* upper bound.
*
* If we know the disbursion of only one side, use it; the reasoning
* If we know the dispersion of only one side, use it; the reasoning
* above still works.
*
* XXX can we make a better estimate here? Using the nullfrac

View File

@@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.45 2000/08/13 02:50:16 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.46 2000/10/05 19:48:29 momjian Exp $
*
* NOTES
* Eventually, the index information should go through here, too.
@@ -168,9 +168,9 @@ get_atttypmod(Oid relid, AttrNumber attnum)
}
/*
* get_attdisbursion
* get_attdispersion
*
* Retrieve the disbursion statistic for an attribute,
* Retrieve the dispersion statistic for an attribute,
* or produce an estimate if no info is available.
*
* min_estimate is the minimum estimate to return if insufficient data
@@ -180,11 +180,11 @@ get_atttypmod(Oid relid, AttrNumber attnum)
* estimating the number of tuples produced by an equijoin.)
*/
double
get_attdisbursion(Oid relid, AttrNumber attnum, double min_estimate)
get_attdispersion(Oid relid, AttrNumber attnum, double min_estimate)
{
HeapTuple atp;
Form_pg_attribute att_tup;
double disbursion;
double dispersion;
int32 ntuples;
atp = SearchSysCacheTuple(ATTNUM,
@@ -194,18 +194,18 @@ get_attdisbursion(Oid relid, AttrNumber attnum, double min_estimate)
if (!HeapTupleIsValid(atp))
{
/* this should not happen */
elog(ERROR, "get_attdisbursion: no attribute tuple %u %d",
elog(ERROR, "get_attdispersion: no attribute tuple %u %d",
relid, attnum);
return min_estimate;
}
att_tup = (Form_pg_attribute) GETSTRUCT(atp);
disbursion = att_tup->attdisbursion;
if (disbursion > 0.0)
return disbursion; /* we have a specific estimate from VACUUM */
dispersion = att_tup->attdispersion;
if (dispersion > 0.0)
return dispersion; /* we have a specific estimate from VACUUM */
/*
* Special-case boolean columns: the disbursion of a boolean is highly
* Special-case boolean columns: the dispersion of a boolean is highly
* unlikely to be anywhere near 1/numtuples, instead it's probably
* more like 0.5.
*
@@ -215,7 +215,7 @@ get_attdisbursion(Oid relid, AttrNumber attnum, double min_estimate)
return 0.5;
/*
* Disbursion is either 0 (no data available) or -1 (disbursion is
* Dispersion is either 0 (no data available) or -1 (dispersion is
* 1/numtuples). Either way, we need the relation size.
*/
@@ -225,7 +225,7 @@ get_attdisbursion(Oid relid, AttrNumber attnum, double min_estimate)
if (!HeapTupleIsValid(atp))
{
/* this should not happen */
elog(ERROR, "get_attdisbursion: no relation tuple %u", relid);
elog(ERROR, "get_attdispersion: no relation tuple %u", relid);
return min_estimate;
}
@@ -234,11 +234,11 @@ get_attdisbursion(Oid relid, AttrNumber attnum, double min_estimate)
if (ntuples == 0)
return min_estimate; /* no data available */
if (disbursion < 0.0) /* VACUUM thinks there are no duplicates */
if (dispersion < 0.0) /* VACUUM thinks there are no duplicates */
return 1.0 / (double) ntuples;
/*
* VACUUM ANALYZE does not compute disbursion for system attributes,
* VACUUM ANALYZE does not compute dispersion for system attributes,
* but some of them can reasonably be assumed unique anyway.
*/
if (attnum == ObjectIdAttributeNumber ||
@@ -252,11 +252,11 @@ get_attdisbursion(Oid relid, AttrNumber attnum, double min_estimate)
* = 1/numtuples. This may produce unreasonably small estimates for
* large tables, so limit the estimate to no less than min_estimate.
*/
disbursion = 1.0 / (double) ntuples;
if (disbursion < min_estimate)
disbursion = min_estimate;
dispersion = 1.0 / (double) ntuples;
if (dispersion < min_estimate)
dispersion = min_estimate;
return disbursion;
return dispersion;
}
/* ---------- INDEX CACHE ---------- */