1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-03 09:13:20 +03:00

Rename pg_attribute.attnvals to attdisbursion.

This commit is contained in:
Bruce Momjian
1997-08-21 03:02:13 +00:00
parent f1edf02cc1
commit e482462960
7 changed files with 29 additions and 29 deletions

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.15 1997/08/21 01:31:24 vadim Exp $
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.16 1997/08/21 03:01:15 momjian Exp $
*
* NOTES
* some of the executor utility code such as "ExecTypeFromTL" should be
@@ -179,7 +179,7 @@ TupleDescInitEntry(TupleDesc desc,
memset(att->attname.data,0,NAMEDATALEN);
att->attnvals = 0; /* dummy value */
att->attdisbursion = 0; /* dummy value */
att->attcacheoff = -1;
att->attnum = attributeNumber;

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.19 1997/08/21 02:27:53 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.20 1997/08/21 03:01:21 momjian Exp $
*
* INTERFACE ROUTINES
* heap_creatr() - Create an uncataloged heap relation
@@ -374,7 +374,7 @@ heap_creatr(char *name,
* 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 attnvals domains with zeros, and fills the
* fills the attdisbursion domains with zeros, and fills the
* attrelid fields with the relid.
*
* scan relation catalog for name conflict
@@ -571,7 +571,7 @@ AddNewAttributeTuples(Oid new_rel_oid,
dpp = tupdesc->attrs;
for (i = 0; i < natts; i++) {
(*dpp)->attrelid = new_rel_oid;
(*dpp)->attnvals = 0;
(*dpp)->attdisbursion = 0;
tup = heap_addheader(Natts_pg_attribute,
ATTRIBUTE_TUPLE_SIZE,
@@ -592,7 +592,7 @@ AddNewAttributeTuples(Oid new_rel_oid,
dpp = HeapAtt;
for (i = 0; i < -1 - FirstLowInvalidHeapAttributeNumber; i++) {
(*dpp)->attrelid = new_rel_oid;
/* (*dpp)->attnvals = 0; unneeded */
/* (*dpp)->attdisbursion = 0; unneeded */
tup = heap_addheader(Natts_pg_attribute,
ATTRIBUTE_TUPLE_SIZE,

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.11 1997/08/21 01:32:19 vadim Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.12 1997/08/21 03:01:27 momjian Exp $
*
* NOTES
* The PortalExecutorHeapMemory crap needs to be eliminated
@@ -382,7 +382,7 @@ PerformAddAttribute(char *relationName,
(Datum) NULL);
attributeD.attrelid = reltup->t_oid;
attributeD.attnvals = 0; /* XXX temporary */
attributeD.attdisbursion = 0; /* XXX temporary */
attributeD.attcacheoff = -1;
attributeTuple = heap_addheader(Natts_pg_attribute,

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.40 1997/08/21 02:27:58 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.41 1997/08/21 03:01:36 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1814,7 +1814,7 @@ vc_updstats(Oid relid, int npages, int ntups, bool hasindex, VRelStats *vacrelst
}
if (selratio > 1.0)
selratio = 1.0;
attp->attnvals = selratio;
attp->attdisbursion = selratio;
WriteNoReleaseBuffer(abuf);
/* DO PG_STATISTIC INSERTS */

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.12 1997/08/20 14:53:20 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.13 1997/08/21 03:01:42 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -507,7 +507,7 @@ ExecSetTypeInfo(int index,
att->atttypid = typeID;
att->attdefrel = 0; /* dummy value */
att->attnvals = 0; /* dummy value */
att->attdisbursion = 0; /* dummy value */
att->atttyparg = 0; /* dummy value */
att->attlen = attLen;
att->attnum = attNum;

View File

@@ -12,7 +12,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.7 1997/08/21 02:28:34 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.8 1997/08/21 03:02:04 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -41,7 +41,7 @@
*/
#define FunctionalSelectivity(nIndKeys,attNum) (attNum==InvalidAttrNumber)
static float32data getattnvals(Oid relid, AttrNumber attnum);
static float32data getattdisbursion(Oid relid, AttrNumber attnum);
static void gethilokey(Oid relid, AttrNumber attnum, Oid opid,
char **high, char **low);
@@ -62,7 +62,7 @@ eqsel(Oid opid,
if (NONVALUE(attno) || NONVALUE(relid))
*result = 0.1;
else
*result = (float64data)getattnvals(relid, (int) attno);
*result = (float64data)getattdisbursion(relid, (int) attno);
return(result);
}
@@ -114,7 +114,7 @@ intltsel(Oid opid,
if ((flag & SEL_RIGHT && val < low) ||
(!(flag & SEL_RIGHT) && val > high)) {
float32data nvals;
nvals = getattnvals(relid, (int) attno);
nvals = getattdisbursion(relid, (int) attno);
if (nvals == 0)
*result = 1.0 / 3.0;
else {
@@ -182,8 +182,8 @@ eqjoinsel(Oid opid,
NONVALUE(attno2) || NONVALUE(relid2))
*result = 0.1;
else {
num1 = getattnvals(relid1, (int) attno1);
num2 = getattnvals(relid2, (int) attno2);
num1 = getattdisbursion(relid1, (int) attno1);
num2 = getattdisbursion(relid2, (int) attno2);
max = (num1 > num2) ? num1 : num2;
if (max == 0)
*result = 1.0;
@@ -245,10 +245,10 @@ intgtjoinsel(Oid opid,
}
/*
* getattnvals - Retrieves the number of values within an attribute.
* getattdisbursion - Retrieves the number of values within an attribute.
*
* Note:
* getattnvals and gethilokey both currently use keyed
* getattdisbursion and gethilokey both currently use keyed
* relation scans and amgetattr. Alternatively,
* the relation scan could be non-keyed and the tuple
* returned could be cast (struct X *) tuple + tuple->t_hoff.
@@ -259,7 +259,7 @@ intgtjoinsel(Oid opid,
* for gethilokey which accesses stahikey in struct statistic.
*/
static float32data
getattnvals(Oid relid, AttrNumber attnum)
getattdisbursion(Oid relid, AttrNumber attnum)
{
HeapTuple atp;
float32data nvals;
@@ -270,11 +270,11 @@ getattnvals(Oid relid, AttrNumber attnum)
Int16GetDatum(attnum),
0,0);
if (!HeapTupleIsValid(atp)) {
elog(WARN, "getattnvals: no attribute tuple %d %d",
elog(WARN, "getattdisbursion: no attribute tuple %d %d",
relid, attnum);
return(0);
}
nvals = ((AttributeTupleForm ) GETSTRUCT(atp))->attnvals;
nvals = ((AttributeTupleForm ) GETSTRUCT(atp))->attdisbursion;
if (nvals > 0) return(nvals);
atp = SearchSysCacheTuple(RELOID, ObjectIdGetDatum(relid),
@@ -283,7 +283,7 @@ getattnvals(Oid relid, AttrNumber attnum)
just for now, in case number of distinctive values is
not cached */
if (!HeapTupleIsValid(atp)) {
elog(WARN, "getattnvals: no relation tuple %d", relid);
elog(WARN, "getattdisbursion: no relation tuple %d", relid);
return(0);
}
ntuples = ((Form_pg_class) GETSTRUCT(atp))->reltuples;